[Ajuda] quando digita /daradmin meu FS desliga
#3

pawn Код:
if(strcmp(cmdtext,"/daradmin",true) == 0)
{
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp)) return SendClientMessage(playerid,-1,"Use /DarAdmin [ID][AdminLevel]");
    new admin = strval(tmp);
    tmp = strtok(cmdtext,idx);
    if(!strlen(tmp)) return SendClientMessage(playerid,-1,"Use /DarAdmin [ID][AdminLevel]");
    new adminlevel = strval(tmp);
    if(adminlevel < valorminimo || adminlevel > valormaximo) return SendClientMessage(playerid,-1,"Level de admin invбlido.");
    new name[MAX_PLAYER_NAME];
    new name2[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    GetPlayerName(admin,name2,sizeof(name2));
    new string[128];
    format(string,sizeof(string),"%s Promoveu %s Para Level %d de Admin!"name,name2,adminlevel);
    SendClientMessageToAll(GetPlayerColor(admin),string);
    PlayerInfo[admin][pAdmin] = adminlevel;//troque isto pela variavel equivalente a do seu sistema de admin
    return 1;
}
Tente isto.

PS: Troque valorminimo e valormaximo pelo nivel minimo e maximo de admin
Ex:
pawn Код:
if(adminlevel < 1 || admilevel > 10)
Reply


Messages In This Thread
[Ajuda] quando digita /daradmin meu FS desliga - by MatriXBorn - 08.10.2011, 19:24
Re: [Ajuda] quando digita /daradmin meu FS desliga - by [BWL]DuST - 08.10.2011, 19:28
Re: [Ajuda] quando digita /daradmin meu FS desliga - by Jason` - 08.10.2011, 19:48
Re: [Ajuda] quando digita /daradmin meu FS desliga - by Nake01 - 08.10.2011, 19:52
Re: [Ajuda] quando digita /daradmin meu FS desliga - by MatriXBorn - 08.10.2011, 19:57

Forum Jump:


Users browsing this thread: 2 Guest(s)