Posts: 691
Threads: 96
Joined: Jan 2012
Reputation:
0
I am using YSI, how do I save the player's skin when he disconnects? I got everything set up, I just do not know how to convert GetPlayerSkin to PlayerInfo. Please help!!
Posts: 368
Threads: 24
Joined: Feb 2012
Add skin variable to PlayerInfo, when you save PlayerInfo on disconnect, you can to PlayerInfo[playerid][Skin] = GetPlayerSkin(playerid);
Posts: 691
Threads: 96
Joined: Jan 2012
Reputation:
0
Well, I get this when I try that, and that was my first idea, it did not save your skin.
warning 215: expression has no effect
Posts: 691
Threads: 96
Joined: Jan 2012
Reputation:
0
I use this for enum: enum pInfo
{
pPass[129],
pCash,
pAdmin,
pKills,
pDeaths,
pSkin,
pGender
}
Posts: 368
Threads: 24
Joined: Feb 2012
You must be doing something wrong then, im using that in my script without any problems.
pawn Код:
PVar[playerid][pSkin] = GetPlayerSkin(playerid);
Its from RequestClass callback, other places in script where i use SetPlayerSkin i also add the skinid to my player var that handles the skin.
Maybe show some code of what you have so far and it will be easier to help.
Posts: 691
Threads: 96
Joined: Jan 2012
Reputation:
0
Yeah, I have that added :/
Posts: 359
Threads: 63
Joined: Jul 2010
Reputation:
0
Н know the problem you are experiencing, even if you store their ID, don't save it from GetPlayerSkin, save it to the enum when they change skin, it's much simpler.
set maybe a 300ms timer to set their skin after they spawn if you're having problems loading it, either way try to save it, and check in the server files or database if it saved correctly.
Posts: 691
Threads: 96
Joined: Jan 2012
Reputation:
0
how to save to enum? Im new at ysi and stuff