saveskin problems - 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: saveskin problems (
/showthread.php?tid=628096)
saveskin problems -
rakinz - 05.02.2017
I've tried to save the player skin after player dies. So I've added these codes:
PHP код:
SetPlayerSkin(playerid, pSkin);
at on player spawn
PHP код:
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Skin",GetPlayerSkin(playerid));
INI_Close(File);
on player disconnect and on player death.
** As you already can see I'm using yini to save player data.
And for some weird reasons I'm getting skinid 7 everytime player spawns.
Re: saveskin problems -
Eoussama - 05.02.2017
First and before you do anything, each player on the server would have a different skin, so, make an array instead "pSkin[MAX_PLAYERS]", to save a player's skin inside a varial, use "pSkin[playerid] = GetPlayerSkin(playerid)"
Re: saveskin problems -
rakinz - 06.02.2017
Quote:
Originally Posted by Eoussama
First and before you do anything, each player on the server would have a different skin, so, make an array instead "pSkin[MAX_PLAYERS]", to save a player's skin inside a varial, use "pSkin[playerid] = GetPlayerSkin(playerid)"
|
I really don't get you man.. btw I've no function with pSkin[MAX_PLAYERS]