[Y_INI]Money failing to give - 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]Money failing to give (
/showthread.php?tid=399737)
[Y_INI]Money failing to give -
nmader - 15.12.2012
Alright, so I am using the Y_INI saving system and I cannot seem to get the money to give to a player properly or something. I have defined here that when a player registers that they receive money but those variables fail to set:
pawn Код:
new hashpass[129];
WP_Hash(hashpass,sizeof(hashpass),inputtext);
new INI:file = INI_Open(Path(playerid));
INI_SetTag(file,"Player's Data");
INI_WriteString(file,"Password",hashpass);
INI_WriteInt(file,"Age",0);
INI_WriteInt(file,"AdminLevel",0);
INI_WriteInt(file,"DonatorLevel",0);
INI_WriteInt(file,"Money",500);
INI_WriteInt(file,"BankMoney", 2500);
INI_WriteInt(file,"Level",1);
INI_WriteInt(file,"Kills",0);
INI_WriteInt(file,"Deaths",0);
INI_WriteInt(file,"Military",0);
INI_WriteInt(file,"MilitaryRank",0);
INI_WriteInt(file,"MilitaryCustomRank",0);
INI_WriteInt(file,"SpawnSelection",0);
INI_Close(file);
return 1;
Any help on my situation will be greatly appreciated!
~Nmader
Re: [Y_INI]Money failing to give -
xMCx - 15.12.2012
in ur login system add this when its true
pawn Код:
GivePlayerMoney(playerid, PlayerInfo[playerid][Money]);
Re: [Y_INI]Money failing to give -
nmader - 15.12.2012
I have that in there as is.
Re: [Y_INI]Money failing to give -
Mike_Peterson - 15.12.2012
You mentioned the variables fail to set.
I assume this is part of a register command so once a player has been registered, is Money set to 2500 in his playerconfig?
If it is, send the GivePlayerMoney line.
Re: [Y_INI]Money failing to give -
nmader - 16.12.2012
Quote:
Originally Posted by Mike_Peterson
You mentioned the variables fail to set.
I assume this is part of a register command so once a player has been registered, is Money set to 2500 in his playerconfig?
If it is, send the GivePlayerMoney line.
|
I have and that worked, thanks for your time.