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; }
Originally Posted by Torran
I dont know why it says unknown command BUT
Why do you check to see if there adminduty is 0 and set it to 0? Same with 1 and set it to 1 Shouldnt you check if its 0 and set it to 1, And check if its 1 and set it to 0 |
Originally Posted by Torran
I dont know why it says unknown command BUT
Why do you check to see if there adminduty is 0 and set it to 0? Same with 1 and set it to 1 Shouldnt you check if its 0 and set it to 1, And check if its 1 and set it to 0 |