14.10.2013, 18:09
why this doesn't work ? it create the user file and the money and score is 0 in the file, not the value that i put.
so when player register and spawn, his money and score is 0
so when player register and spawn, his money and score is 0
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DIALOG_REGISTER:
{
if (!response) return Kick(playerid);
if(response)
{
if(strlen(inputtext))
{
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Password",udb_hash(inputtext));
INI_WriteInt(File,"Cash",15000);
INI_WriteInt(File,"Score",5);
INI_Close(File);
}
}
}
}
return 1;
}
public OnPlayerSpawn(playerid)
{
GivePlayerMoney(playerid,PlayerInfo[playerid][pCash]
SetPlayerScore(playerid,PlayerInfo[playerid][pScore]
return 1;
}