27.12.2014, 18:46
This
only creates a file and writes to it; there's no assignment to
thus it is the most probable, that this variable is equal to 0. You can do either:
or
With this 2nd one, your
should work fine.
Greetings.
Код:
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);
}
Код:
PlayerInfo[playerid][pCash]
Код:
GivePlayerMoney(playerid, 10000);
Код:
... INI_WriteInt(File,"Cash",10000); Player[playerid][pCash] = 10000; ...
Код:
GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
Greetings.

