04.04.2011, 01:22
I got one question, how do you save score to userfile? i mean killing score?
i have tried with this with no success. I only put the score code here, not the whole creation of the userfile.
i have tried with this with no success. I only put the score code here, not the whole creation of the userfile.
pawn Код:
new Score[MAX_PLAYERS];
public OnPlayerRegister(playerid, password[])
dini_IntSet(file, "Score", Score[playerid]);
public OnPlayerLogin(playerid,password[])
Score[playerid] = dini_Int(file,"Score");
public OnPlayerDeath(playerid, killerid, reason)
{
SendDeathMessage(killerid, playerid, reason);
SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
return 1;
}
public OnPlayerDisconnect
dini_IntSet(file, "Score", Score[playerid]);