01.03.2010, 13:49
Sup, can you see any errors in this script, when I type the cmd it just sayd "You are now off admin duty".
Thanks
Код:
if (strcmp(cmd, "/adminduty", true) == 0) { if(IsPlayerConnected(playerid)) { if(IsLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, " You are not logged in yet."); return 1; } if(PlayerInfo[playerid][pAdmin] >= 1) { if(AdminDuty[playerid] == 1) { AdminDuty[playerid] = 1; SetPlayerArmour(playerid, 100); SetPlayerHealth(playerid, 100); SetPlayerSkin(playerid, 217); SetPlayerColor(playerid, COLOR_WHITE); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "AdmCmd: %s is now on admin duty.", sendername); SendClientMessageToAll(COLOR_ADMINCHAT,string); } else if(AdminDuty[playerid] == 0) { AdminDuty[playerid] = 0; SetPlayerArmour(playerid, 0); SetPlayerHealth(playerid, 100); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "AdmCmd: %s is now off admin duty.", sendername); SendClientMessageToAll(COLOR_ADMINCHAT,string); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " Identification Error - You need admin level 1 to do this."); return 1; } } return 1; }