Money dissapearing - 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: Money dissapearing (
/showthread.php?tid=410262)
Money dissapearing -
Noles2197 - 24.01.2013
Working with Kush's tutorial on how to create a login/register system with Y_INI
https://sampforum.blast.hk/showthread.php?tid=273088
I've put over 80 grand in my player's data and it has saved and after a few dozen logins or so the money is gone for some reason. It also happens with my friends too. Anyone know why?
pawn Код:
enum pInfo
{
pPass,
pCash
}
pawn Код:
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
INI_Int("Password",PlayerInfo[playerid][pPass]);
INI_Int("Cash",PlayerInfo[playerid][pCash]);
return 1;
}
pawn Код:
case 1:
{
if (!response) return Kick(playerid);
if(response)
{
if(!strlen(inputtext)) return ShowPlayerDialog(playerid,1,DIALOG_STYLE_PASSWORD,"Registration","Invalid password!\nType a password to register","Register","Cancel");
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Password",udb_hash(inputtext));
INI_WriteInt(File,"Cash",0);
}
}