Jump to content

[REZOLVAT] Problema ban


alkaTraz
 Share

Recommended Posts

Username: alkaTraz
Problema întălnită: comanda /ban nu o pot folosii pe nimeni ( nici pe admin, nici pe un simplu player ) zice ca nivelul de admin este mai mic sau egal ca al meu.
Detalii despre problemă:
Ce ai încercat să faci înainte să postezi?: sa modific ">"
Cod sursă (recomandat pastebin.com) : link here.
Alte detalii:

Link to comment
Share on other sites

Fuck logic ????

YCMD:ban(playerid, params[], help) {
    if(PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid, COLOR_WHITE, AdminOnly);
    new id,reason[128],string[200],type, str[128];
    if(DeelayCommand[playerid][0] != 0) return DeelayTime(playerid, 0);
    if(sscanf(params, "uds[128]", id,type,reason)) return SCM(playerid,COLOR_GREY, "{FFBF36} USAGE: {FFFFFF}/ban <playerid/name> <days | 0 = permanent ip ; 1 = permanent account> <reason>");
    if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SCM(playerid, COLOR_GREY, "Acel player nu este conectat.");
    if(id == playerid) return SCM(playerid, COLOR_GREY, "Nu iti poti da ban singur.");
    if(FaceReclama(reason)) return RemoveFunction(playerid, reason);
    if(PlayerInfo[id][pAdmin] == 7) return 1;
    if(PlayerInfo[playerid][pAdmin] <= PlayerInfo[id][pAdmin]) return SendClientMessage(playerid, -1, "Acel player are adminul egal sau mai mare decat tine!");
    InsereazaSanctiune(id, playerid, BAN, reason);
}

By the way: https://wiki.sa-mp.com/wiki/Control_Structures - citeste acest articol, o sa-ti fie de ajutor.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...