SA-MP Forums Archive
Score wont seem to save - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Score wont seem to save (/showthread.php?tid=166649)



Score wont seem to save - Dolph - 09.08.2010

The score 'system' is suppose to give u a score everytime you kill someone.


Here is the code(s)

Under OnPlayerDisconnect
____________________________
dini_IntSet(file,"score", GetPlayerScore(playerid));


Under login command
_________________________________
SetPlayerScore(playerid,dini_Int(file,"score"));



Under register command
____________________________________
dini_IntSet(file,"score", 0);




Could someone tell me what I've done wrong?


Re: Score wont seem to save - selten98 - 09.08.2010

didnt read so well... srry


Re: Score wont seem to save - Dolph - 09.08.2010

The problem is not give the point, but save it..


Re: Score wont seem to save - MadeMan - 09.08.2010

How do you define the "file" ?


Re: Score wont seem to save - Dolph - 09.08.2010

What do you mean?

Everything else saves, except for this. So I have done something wrong.


Re: Score wont seem to save - Cameltoe - 09.08.2010

You should use playervar's for this you could either do:

pawn Код:
// Set
SetPVarInt(playerid, "Score", GetPlayerScore(playerid));
// Get
GetPVarInt(playerid, "Score")
pawn Код:
new Score[MAX_PLAYERS];
// Set
Score[playerid] = GetPlayerScore(playerid);
// Get
Score[playerid];



Re: Score wont seem to save - Dolph - 09.08.2010

Still doesnt work