Admin system ?
#6

You said you use zcmd, OnPlayerCommandText is incompatible with it
Well you can't know that, he should at least added support for it

If you are already using zcmd I expect that you use sscanf as well
pawn Код:
CMD:mettreadmin(playerid, params[]) {
    new
        para1,
        level
    ;
    if(sscanf(params, "ui", para1, level)) {
        return SendClientMessage(playerid, -1, "Utilisation: /mettreadmin [IdJoueur/NomPrйnom] [niveau(10-90)]");
    }
    if(pInfo[playerid][Admin] < 90) {
        return SendClientMessage(playerid, -1, "Cette commande n'est pas disponible !");
    }
    if(pInfo[playerid][Admin] <= level) {
        return SendClientMessage(playerid, -1, "Vous n'avez pas le niveau admin requis pour effectuй cette commande !");
    }
    if(!IsPlayerConnected(para1)) {
        return SendClientMessage(playerid,-1,"La commande entrйe est inconnue !");
    }
    GetPlayerName(para1, giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    pInfo[para1][Admin] = level;
    printf("%s а mis %s admin niveau %d.", sendername, giveplayer, level);
    format(string, sizeof(string), "Vous avez йtй mis admin niveau  %d  par %s ! Utilisez /acmds pour voir vos commandes.", level, sendername);
    SendClientMessage(para1, -1, string);
    format(string, sizeof(string), "Vous avez mis %s au niveau Admin %d.", giveplayer,level);
    return SendClientMessage(playerid, -1, string);
}
Thats the same command just a little bit more readable
Reply


Messages In This Thread
Admin system ? - by anou1 - 09.01.2014, 21:53
AW: Admin system ? - by Nero_3D - 09.01.2014, 21:59
Re: Admin system ? - by anou1 - 09.01.2014, 22:02
Re: Admin system ? - by Hansrutger - 09.01.2014, 22:05
Re: Admin system ? - by anou1 - 09.01.2014, 22:08
AW: Admin system ? - by Nero_3D - 09.01.2014, 22:12
Re: Admin system ? - by anou1 - 09.01.2014, 22:36

Forum Jump:


Users browsing this thread: 1 Guest(s)