Skin problem - 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 problem (
/showthread.php?tid=450969)
Skin problem -
martoivanov - 15.07.2013
I made my login/register system save player's skin. I set the default skin when register to ID 0. When player spawn his skin is ID 0 (if he hasn't got saved skin). How can i set these players' skins to be what they had chosen in requestclass.
OnPlayerSpawn:
pawn Код:
SetPlayerSkin(playerid, pInfo[playerid][Skin]);
When player register:
pawn Код:
INI_WriteInt(file, "Skin", 0);
Can someone help me with this? Thanks in advance!

PS I use this system
https://sampforum.blast.hk/showthread.php?tid=352703
Re: Skin problem -
arjanforgames - 15.07.2013
Use this OnPlayerDisconnect:
pawn Код:
INI_WriteInt(File,"Skin",GetPlayerSkin(playerid));
On OnPlayerSpawn:
pawn Код:
SetPlayerSkin(playerid, pInfo[playerid][Skin]);
Re: Skin problem -
martoivanov - 15.07.2013
Yes I have this. But when the player hasn't got saved skin? I don't want to set his/her skin to ID 0
Re: Skin problem -
arjanforgames - 15.07.2013
So you want to set a starting skin? Give me the ID you want.
EDIT: I see. The ID they chose on the selection, my fault.
Re: Skin problem -
martoivanov - 15.07.2013
I fixed the bug
Re: Skin problem -
arjanforgames - 15.07.2013
Good.