Skin problem
#1

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
Reply
#2

Use this OnPlayerDisconnect:

pawn Код:
INI_WriteInt(File,"Skin",GetPlayerSkin(playerid));
On OnPlayerSpawn:
pawn Код:
SetPlayerSkin(playerid, pInfo[playerid][Skin]);
Reply
#3

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
Reply
#4

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.
Reply
#5

I fixed the bug
Reply
#6

Good.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)