[Y_INI]Money failing to give
#1

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
Reply
#2

in ur login system add this when its true
pawn Код:
GivePlayerMoney(playerid, PlayerInfo[playerid][Money]);
Reply
#3

I have that in there as is.
Reply
#4

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.
Reply
#5

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)