Saving skins - 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: Saving skins (
/showthread.php?tid=330746)
Saving skins -
HDFord - 02.04.2012
I want people to spawn at the same location as they were on when they disconnected, that's no problem. But when i'm saving the skin on "OnPlayerDisconnect" i use "GetPlayerSkin".
But how can i give the skin the player had before disconnecting back when player spawns with "SetPlayerSkin" or something else if possible.
Re: Saving skins -
ReneG - 02.04.2012
Under OnPlayerDisconnect you would use
pawn Код:
new skin = GetPlayerSkin(playerid);
Then write it as so in their .ini file. If you already have their positions saved.
Add an if under OnPlayerSpawn if their x variable is equal to 0 then spawn them at the noob spawn and give them the newb skin. Else, they get the skin they last had.