if(PlayerInfo[playerid][TrashDuty] == 0)
{
PlayerInfo[playerid][TrashDuty] = 1;
SetPlayerSkin(playerid, 50);
SendClientMessage(playerid, GREEN, "You are now on garbage collector duty.");
}
else
{
PlayerInfo[playerid][TrashDuty] = 0;
SetPlayerSkin(playerid, 3);
PlayerInfo[playerid][FreeSkin] = 1;
SendClientMessage(playerid, GREEN, "You are not on garbage collector duty anymore. You can change ur skin for free once by using /freeskin");
}
if(PlayerInfo[playerid][TrashDuty] == 0) { PlayerInfo[playerid][TrashDuty] = 1; PlayerInfo[playerid][oldskin] = GetPlayerSkin(playerid); //addedline SetPlayerSkin(playerid, 50); SendClientMessage(playerid, GREEN, "You are now on garbage collector duty."); } else { PlayerInfo[playerid][TrashDuty] = 0; SetPlayerSkin(playerid, PlayerInfo[playerid][oldskin]); //changed line PlayerInfo[playerid][FreeSkin] = 1; SendClientMessage(playerid, GREEN, "You are not on garbage collector duty anymore. You can change ur skin for free once by using /freeskin"); }
do a variable for playerskin and save skin in there like this
Код:
if(PlayerInfo[playerid][TrashDuty] == 0) { PlayerInfo[playerid][TrashDuty] = 1; PlayerInfo[playerid][oldskin] = GetPlayerSkin(playerid); //addedline SetPlayerSkin(playerid, 50); SendClientMessage(playerid, GREEN, "You are now on garbage collector duty."); } else { PlayerInfo[playerid][TrashDuty] = 0; SetPlayerSkin(playerid, PlayerInfo[playerid][oldskin]); //changed line PlayerInfo[playerid][FreeSkin] = 1; SendClientMessage(playerid, GREEN, "You are not on garbage collector duty anymore. You can change ur skin for free once by using /freeskin"); } ![]() |
PlayerInfo[playerid][oldskin] = GetPlayerSkin(playerid);
SetPlayerSkin(playerid, PlayerInfo[playerid][oldskin]);
if(PlayerInfo[playerid][TrashDuty] == 0) {
PlayerInfo[playerid][TrashDuty] = 1;
SetPVarInt(playerid, "OldSkin", GetPlayerSkin(playerid) + 1); // +1 to avoid CJ skin.
SetPlayerSkin(playerid, 50);
SendClientMessage(playerid, GREEN, "You are now on garbage collector duty.");
} else {
PlayerInfo[playerid][TrashDuty] = 0;
new oldskin = GetPVarInt(playerid, "OldSkin") - 1; // -1 because the reason above.
DeletePVarInt(playerid, "OldSkin");
SetPlayerSkin(playerid, oldskin);
SendClientMessage(playerid, GREEN, "You are not on garbage collector duty anymore. You can change ur skin for free once by using /freeskin");
}