SA-MP Forums Archive
Skin not setting upon login. - 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: Skin not setting upon login. (/showthread.php?tid=609366)



Skin not setting upon login. - Dokins - 11.06.2016

pawn Код:
SetPlayerVirtualWorld(playerid, LastVW[playerid]);
            SetPlayerInterior(playerid, LastInt[playerid]);
            SetSpawnInfo(playerid, 0, skin, LastX[playerid], LastY[playerid], LastZ[playerid]+0.5,0, 0,0,0,0,0,0);
            SpawnPlayer(playerid);
            SetPlayerSkin(playerid, skin);
I only added the SetPlayerSkin afterwards, I debugged it and it definitely gets the correct skin from skin.

I'm extremely confused, adds CJ skin.


Re: Skin not setting upon login. - K0P - 11.06.2016

It sets the CJ skin because the skin variable is returning the value 0.Check if you are updating the variable properly.


Re: Skin not setting upon login. - povargek - 11.06.2016

You need use a SetPlayerSkin in OnPlayerSpawn public


Re: Skin not setting upon login. - Dokins - 11.06.2016

It crashes the player when using SetPlayerSkin in OnPlayerSpawn


Re: Skin not setting upon login. - K0P - 11.06.2016

Quote:
Originally Posted by Dokins
Посмотреть сообщение
It crashes the player when using SetPlayerSkin in OnPlayerSpawn
Try using different coordinates for spawn and then trying setting the skin on spawn


Re: Skin not setting upon login. - Dokins - 11.06.2016

It saves the players last coordinates and uses them to spawn the player.