04.04.2012, 02:01
I have made it so when you do /adminduty your skin changes and what im trying to do is when you do /adminduty again to go off duty i want my skin to go back to what it was before i went on duty
I have tried but this is not working
Please Help Please
I have tried but this is not working
Код:
CMD:skin(playerid, params[]) { PlayerInfo[playerid][pSkin] = 1; SetPlayerSkin(playerid, 3); SendClientMessage(playerid, COLOR_GOLD, "Skin changed"); return 1; }
Код:
CMD:adminduty(playerid, params[]) { if(PlayerData[ID][AdminLevel] >= 1) { if(AdminDuty[playerid]) //if they are already in admin duty { AdminDuty[playerid] = false; //Set the AdminDuty variable to false SetPlayerHealth(playerid,100); SetPlayerArmour(playerid,0); SetPlayerColor(playerid, 0xFFFFFFFF); //Set their color to white GetPlayerSkin(playerid); SendClientMessage(playerid, -1, "Admin duty set {FF0000}OFF!"); //Inform them about the duty change } else //If they are not on admin duty { AdminDuty[playerid] = true; //Set the AdminDuty variable to true SetPlayerHealth(playerid,99999); SetPlayerArmour(playerid,99999); SetPlayerSkin(playerid,82); SetPlayerColor(playerid, 0xFF0000FF); //Set their color to red SendClientMessage(playerid, -1, "Admin duty set {00FF00}ON!"); //Inform them about the duty change } } else return SendClientMessage(playerid, COLOR_RED, "You have to be level 1 to use this command!"); //if he isn't allowed to use this command, send him this message return 1; }