SA-MP Forums Archive
Set player last skin - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Set player last skin (/showthread.php?tid=349505)



Set player last skin - Stefand - 09.06.2012

Hello,

I've made something for LSEMS that when you go on duty and take duty clothes, and then go off duty you get your skin back that you had before taking duty clothes..

I tried the same for the LSPD but that dont wanna work..


Police
pawn Код:
if(Player[playerid][CopDuty] == 1)
                        {
                            SetPlayerSkin(playerid, Player[playerid][LastSkin]);
                            Player[playerid][CopDuty] = 0;
                            SendClientMessage(playerid, WHITE, "You are now off police duty.");
                            SetPlayerArmour(playerid, 0);
                        }
                        else
                        {
                            Player[playerid][CopDuty] = 1;
                            SendClientMessage(playerid, WHITE, "You are now on police duty.");
                            SetPlayerArmour(playerid, 100);
                        }
                    }
Medic:
pawn Код:
if(Player[playerid][MedicDuty] == 1)
                        {
                            Player[playerid][MedicDuty] = 0;
                            SetPlayerSkin(playerid, Player[playerid][LastSkin]);
                            SendClientMessage(playerid, WHITE, "You are no longer on medic duty. You won't recieve calls.");
                        }
                        else
                        {
                            Player[playerid][MedicDuty] = 1;
                            SendClientMessage(playerid, WHITE, "You are now on medic duty. You will recieve calls.");
                        }
                    }



Re: Set player last skin - [KHK]Khalid - 09.06.2012

pawn Код:
SetPlayerSkin(playerid, Player[playerid][LastSkin]);
This line should be working properly. But as it doesn't then show us the codes where
you store a a thing into Player[playerid][LastSkin]


Re: Set player last skin - James Coral - 09.06.2012

EDIT: REMOVED


Re: Set player last skin - Stefand - 09.06.2012

Fixed