Need Help With Y_INI - 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: Need Help With Y_INI (
/showthread.php?tid=377749)
Need Help With Y_INI -
gtakillerIV - 15.09.2012
Hi guys.
I made a Login/register system using Y_INI but my problem is OnPlayerDisconnect. What happes is that it doesn't replace the text instead it makes new ones.
Inside the .ini
[Player Data Of gtakilleriv]
Password = 177406563
Cash = 0
Admin = 0
Kills = 0
Score = 0
Ip = 127.0.0.1
Deaths = 0
[Player Data Of gtakilleriv]
Cash = 0
Admin = 0
Kills = 0
Score = 0
Deaths = 0
It's like that I'm not sure what's wrong. My OnPlayerDisconnect :-
Код:
public OnPlayerDisconnect(playerid, reason)
{
new INI:File = INI_Open(UserPath(playerid));
new name[MAX_PLAYER_NAME],string1[50];
GetPlayerName(playerid, name, sizeof(name));
format(string1,sizeof(string1), "Player Data Of %s", name);
INI_SetTag(File,string1);
INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
INI_WriteInt(File, "Score", PlayerInfo[playerid][pScore]);
INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
INI_Close(File);
return 1;
}
I'm not sure what's wrong it did the same thing when I made a "/makeadmin" command, instead of replacing the current text it made a new one.
Thank you.
Re: Need Help With Y_INI -
gtakillerIV - 15.09.2012
Well thanks for your help I will see it now.
I hope in your new release(If there is gonna be one) you can add spaces
Anyways thanks for your great work ******.
Re: Need Help With Y_INI -
gtakillerIV - 15.09.2012
Alright I will use that thanks for your help