09.04.2017, 19:39
Personally I use PVars for SetPlayerBacks (Such as entering paintball... ect).
PHP код:
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");
}