Save skins?
#1

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

Add skin variable to PlayerInfo, when you save PlayerInfo on disconnect, you can to PlayerInfo[playerid][Skin] = GetPlayerSkin(playerid);
Reply
#3

What enum do you use?
Reply
#4

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

I use this for enum: enum pInfo
{
pPass[129],
pCash,
pAdmin,
pKills,
pDeaths,
pSkin,
pGender
}
Reply
#6

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

so it'll be:
pawn Код:
INI_WriteInt("Skin",pInfo[playerid][pSkin]);
Reply
#8

Yeah, I have that added :/
Reply
#9

Н 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.
Reply
#10

how to save to enum? Im new at ysi and stuff
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)