24.12.2014, 12:52
pawn Code:
new PreviousSkin[MAX_PLAYERS]; //At the top of your script. Used to save the Skin ID.
CMD:pizzaduty(playerid, params[]) //When a player types "/pizzaduty"
{
if(/*PlayerOnPizzaDuty*/) return SendClientMessage(playerid, -1, "You are already on duty");
//Make sure you check to see whether the person is on duty or not. 'if(GetPlayerSkin(playerid) == 155)' perhaps?
PreviousSkin[playerid] = GetPlayerSkin(playerid); //Saves the player's skin ID to the variable 'PreviousSkin'.
//Something here...
SetPlayerSkin(playerid, 155); //They are now on duty.
return 1;
}
CMD:pizzaoffduty(playerid, params[]) //When a player types "/pizzaoffduty"
{
if(/*PlayerIsNotOnDuty*/) return SendClientMessage(playerid, -1, "You are not on duty");
//'if(GetPlayerSkin(playerid) != 155)' would also work.
SetPlayerSkin(playerid, PreviousSkin[playerid]); //Set the player's skin to the ID saved in 'PreviousSkin'.
return 1;
}

