[Ajuda]dar level admin
#1

Boa tarde,preciso de ajuda com meu cуdigo, ele compila, mas na hora de usar o comando, e vc escrever /level [id] [level] ele diz q o comando n existe.

Код:
if(strcmp(cmdtext, "/level", true) == 0) {
new tmp[256];
new lvl;
new idx;
new giveplayerid;
new giveplayer[MAX_PLAYERS];
new pname[MAX_PLAYERS];
new strlvl[256];
tmp = strtok(cmdtext, idx);
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, pname, sizeof(pname));
if(admin[playerid] <= 2 ) return SendClientMessage(playerid, 0xFF0019FF, "[SG-ADMIN]Vocк tem que ter Level 2 De Administraзгo no minimo.");
if(lvl > 3 || lvl < 0) return SendClientMessage(playerid, 0xFF0019FF, "[SG-ADMIN]Level Invбlido");
if(!strlen(tmp)) {
SendClientMessage(playerid, 0xFF0019FF, "[SG-ADMIN]Use /LEVEL [playerid] [lvl]");
return 1;
}
giveplayerid = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, 0xFF0019FF, "[SG-ADMIN]Use /LEVEL [playerid] [lvl]");
return 1;
}
lvl = strval(tmp);
if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, 0xFF0019FF, "[SG-ADMIN]Player Invalido");
format(stringa, sizeof(stringa), "[SG-ADMIN]{00FF1E}Vocк deu Administraзгo para %s {FF0019}[Level: %d]", giveplayer, lvl);
SendClientMessage(playerid, 0xFF0019FF, stringa);
format(stringa, sizeof(stringa), "[SG-ADMIN]{00FF1E}%s te deu Administraзгo {FF0019}[Level: %d]", pname, lvl);
SendClientMessage(giveplayerid, 0xFF0019FF, stringa);
format(stringa, sizeof(stringa), "%d", lvl);
format(strlvl, sizeof(strlvl), "%s", pname);
dini_Set(stringa,"Admin",strlvl);
admin[playerid] = lvl;
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)