01.11.2017, 10:11
You need to save the old skin in the player database
Here is an example. Don't forget to edit it.
Here is an example. Don't forget to edit it.
PHP код:
#define Skin 30 //This is the skin you want the player to change to when he enters the command
new OldSkin[MAX_PLAYERS];
new Equipped[MAX_PLAYERS] = false;
CMD:equipment(playerid, params[]) {
if(Equipped[playerid] == true) {
SendClientMessage(playerid, 0x005500AA, "You have returned to your old clothes");
SetPlayerSkin(playerid, OldSkin[playerid]);
Equipped[playerid] = false;
}
else {
Equipped[playerid] = true;
OldSkin[playerid] = GetPlayerSkin(playerid);
SendClientMessage(playerid, 0x005500AA, "You have changed your clothes");
SetPlayerSkin(playerid, Skin);
}
return 1;
}