Posts: 21
Threads: 2
Joined: Nov 2011
Reputation:
0
Hi,i have one problem with saving skin.When player chose skin from class selection he gets CJ skin,thats because i put SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]); in OnPlayerSpawn callback.But,when i delete SetPlayerSkin(playerid...from OnPlayerSpawn its work..but when i set player skin with command (/setskin) and kill myself i get old skin.I can't explain better because i don't know good english,i think you understand me.If you don't understand go to 95.180.59.10:7787 and i will show you.Im using y_ini register system.
Posts: 1,022
Threads: 207
Joined: Aug 2011
Reputation:
0
U should add a timer that saves the player account every 10 seconds so under it you make the skin save
The OnPlayerSpawn callback is called when a player spawns. If you die, you will respawn, OnPlayerSpawn is then called. You must remove the SetPlayerSkin function from OnPlayerSpawn, spawn the player, get his skin id and output the data either as a message or directly to the server console.
Posts: 20
Threads: 1
Joined: Nov 2011
Reputation:
0
Also check for the appearance of the player is loading playerinfo [playerid] [pSkin]
Posts: 21
Threads: 2
Joined: Nov 2011
Reputation:
0
now its work but only for id 0 save skin..
Posts: 1,008
Threads: 101
Joined: Apr 2008
Reputation:
0
#Tanush, That's a waste of usage, Timers also lag.
Monk, I've never scripted with Yini, But How much are you trying to save? Alot of things? or small amount of things?
Yinis good for large amounts of data, But if it's like 2 or three things, Get something smaller. I Use Dini for my small saving, and use DJSON for my larger saving. Message me so i can talk to you further.
Posts: 21
Threads: 2
Joined: Nov 2011
Reputation:
0
I wont to make two commands,/saveskin [skinid] and /nosaveskin (when you tyre this,the skin will be save only from class selection).For example,if you tyre /saveskin 294 and go relog and on class selection you can chose any skin but when you spawn you will get skin 294.