04.03.2010, 16:43
Hello guys,
Iґm having a problem with score update in the server.
Im using Dini, for register etc.
It saves this for score
This is under command register.
This is under command login
Under OnPlayerSpawn
Under OnPlayerDeath
Now this is the problem, it saves when registering to frags = 0
When I kill someone and alt+tab out of the game and open my file, it says I have frags = 1 (And that's good)
But when I leave the server it puts frags = 0 back.
Question is how could this happen and could someone explain me what is wrong..
Thanks in advance
Iґm having a problem with score update in the server.
Im using Dini, for register etc.
It saves this for score
Код:
dini_IntSet(udb_encode(playername), "Frags", Frags[playerid]);
Код:
tmps1 = dini_Get(udb_encode(playername), "Frags"); Frags[playerid] = strval( tmps1 );
Код:
tmps1 = dini_Get(udb_encode(playername), "Frags"); if (strval(tmps1) == 1){ SetPlayerScore(playerid, dini_Int(udb_encode(playername),"Frags")); }
Код:
SetPlayerScore(killerid, GetPlayerScore (killerid)+1);
Now this is the problem, it saves when registering to frags = 0
When I kill someone and alt+tab out of the game and open my file, it says I have frags = 1 (And that's good)
But when I leave the server it puts frags = 0 back.
Question is how could this happen and could someone explain me what is wrong..
Thanks in advance