06.12.2009, 13:49
ok when i go ingame i do /aunlock and the players name but when i do dat nothing happens not even the texts pops up same thing with /alock heres my commands
Код:
if(strcmp(cmd, "/aunlock", true) == 0) { if (PlayerInfo[playerid][pAdmin] >= 3) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /aunlock [playerid/PartOfName]"); return 1; } giveplayerid = ReturnUser(tmp); if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if(PlayerInfo[giveplayerid][pLocked] == 1) { PlayerInfo[giveplayerid][pLocked] = 0; TogglePlayerControllable(giveplayerid, 1); SendClientMessage(playerid, COLOR_YELLOW, "Account unlocked succesfuly."); } } } } else { SendClientMessage(playerid, COLOR_GRAD1, "You must be a level 3 admin to do this command."); } return 1; } if(strcmp(cmd, "/alock", true) == 0) { if (PlayerInfo[playerid][pAdmin] >= 3) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /aunlock [playerid/PartOfName]"); return 1; } giveplayerid = ReturnUser(tmp); if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if(PlayerInfo[giveplayerid][pLocked] == 0) { PlayerInfo[giveplayerid][pLocked] = 1; TogglePlayerControllable(giveplayerid, 1); SendClientMessage(playerid, COLOR_YELLOW, "Account locked succesfuly."); } } } } else { SendClientMessage(playerid, COLOR_GRAD1, "You must be a level 3 admin to do this command."); } return 1; }