[HELP] skin question
#3

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;
}
Reply


Messages In This Thread
[HELP] skin question - by Luca12 - 24.12.2014, 12:29
Re: [HELP] skin question - by Cookland - 24.12.2014, 12:47
Re: [HELP] skin question - by Threshold - 24.12.2014, 12:52
Re: [HELP] skin question - by Luca12 - 24.12.2014, 13:06
Re: [HELP] skin question - by Threshold - 24.12.2014, 13:10
Re: [HELP] skin question - by Luca12 - 24.12.2014, 13:31

Forum Jump:


Users browsing this thread: 1 Guest(s)