08.12.2009, 08:37
soz it was a return user problem it dident find it and now i got thise code but when i use it it dont give the player admin so could you plz help
there is no errors it is just not giveing them admin
Код:
if (strcmp(cmd, "/giveadmin", true) ==0 ) { new giveplayerid; if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][Admin] == 1) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /giveadmin[playerid] "); return 1; } giveplayerid = ReturnUser(tmp); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /giveadmin [playerid] "); return 1; } if (IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { PlayerInfo[giveplayerid][Admin] = 1; SendClientMessage(giveplayerid, COLOR_GRAD1, "You Have been Given Admin"); } } } else { SendClientMessage(giveplayerid, COLOR_GRAD1, "You Are Not Admin"); } } return 1; }
there is no errors it is just not giveing them admin