Money
#2

This
Код:
if(response) 
{ 
	if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Register",COL_RED"Invalid Password","Register","Close"); 
	new INI:File = INI_Open(UserPath(playerid)); 
	INI_SetTag(File,"data"); 
	INI_WriteInt(File,"Password",udb_hash(inputtext)); 
	INI_WriteInt(File,"Cash",10000); 
	INI_WriteInt(File,"Admin",0); 
	INI_WriteInt(File,"Kills",0); 
	INI_WriteInt(File,"Deaths",0); 
	INI_WriteInt(File,"Skin",0); 
	INI_Close(File); 
	ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success",""COL_GREEN"You have registerd successfully","Start",""); 
	SpawnPlayer(playerid); 
}
only creates a file and writes to it; there's no assignment to
Код:
PlayerInfo[playerid][pCash]
thus it is the most probable, that this variable is equal to 0. You can do either:
Код:
GivePlayerMoney(playerid, 10000);
or
Код:
...
	INI_WriteInt(File,"Cash",10000); 
	Player[playerid][pCash] = 10000;
...
With this 2nd one, your
Код:
GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
should work fine.

Greetings.
Reply


Messages In This Thread
Money - by nezo2001 - 27.12.2014, 18:12
Re: Money - by LetsOWN[PL] - 27.12.2014, 18:46

Forum Jump:


Users browsing this thread: 1 Guest(s)