Saving player skin onduty/offduty
#3

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"); 
              }
Also just a friendly reminder, you code seems unalingned idk if it happened when you copied here but keeping it alingned helps a lot of stuff with not mixing codes to eachother
Reply


Messages In This Thread
Saving player skin onduty/offduty - by jasperschellekens - 09.04.2017, 17:48
Re: Saving player skin onduty/offduty - by Vin Diesel - 09.04.2017, 18:01
Re: Saving player skin onduty/offduty - by grymtn - 09.04.2017, 18:03
Re: Saving player skin onduty/offduty - by Vin Diesel - 09.04.2017, 18:43
Re: Saving player skin onduty/offduty - by grymtn - 09.04.2017, 18:48
Re: Saving player skin onduty/offduty - by Vin Diesel - 09.04.2017, 19:00
Re: Saving player skin onduty/offduty - by Bwandon - 09.04.2017, 19:39

Forum Jump:


Users browsing this thread: 1 Guest(s)