Score wont seem to save
#1

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?
Reply
#2

didnt read so well... srry
Reply
#3

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

How do you define the "file" ?
Reply
#5

What do you mean?

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

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];
Reply
#7

Still doesnt work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)