[Y_ini Problem ] Nw its save!, but not loading for me :( help ! - 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: [Y_ini Problem ] Nw its save!, but not loading for me :( help ! (
/showthread.php?tid=532052)
[Y_ini Problem ] Nw its save!, but not loading for me :( help ! -
Mzake - 16.08.2014
Hi people, im having a loading stats problem , well not stats, loading skin!
When player disconnect it saves his skin in my user path normally but when he join he join with CJ skin!!!
any help? script below..
saving :
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
new sID = GetPlayerSkin(playerid);
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"Player's Skin");
INI_WriteInt(File,"pSkin",sID);
INI_Close(File);
}
and loading :
pawn Код:
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
INI_Int("pSkin",PlayerInfo[playerid][pSkin]);
return 1;
}
onplayerspawn :
pawn Код:
public OnPlayerSpawn(playerid)
{
SetPlayerSkin(playerid,PlayerInfo[playerid][pSkin]);
return 1;
}
Help me!!!!
Re: [Y_ini Problem ] Nw its save!, but not loading for me :( help ! -
Stinged - 16.08.2014
Where are you calling INI_ParseFile?
Re: [Y_ini Problem ] Nw its save!, but not loading for me :( help ! -
Mzake - 16.08.2014
i didnt help me

how can i add?
Re: [Y_ini Problem ] Nw its save!, but not loading for me :( help ! -
Stinged - 16.08.2014
If you have a register system then call it when the player logs in, if not just try OnPlayerConnect instead.
pawn Код:
public OnPlayerConnect(playerid)
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
return 1;
}
Re: [Y_ini Problem ] Nw its save!, but not loading for me :( help ! -
Mzake - 16.08.2014
Quote:
Originally Posted by Stinged
If you have a register system then call it when the player logs in, if not just try OnPlayerConnect instead.
pawn Код:
public OnPlayerConnect(playerid) { INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid); return 1; }
|
WOW man!! its working now thank you so much

i will give u credits in this project im workign on
Re: [Y_ini Problem ] Nw its save!, but not loading for me :( help ! -
biker122 - 16.08.2014
EDIT: k, i was slow now .-.