Save score
#1

How can I save score on player death? Now when player dies his score goes to zero.
Reply
#2

Quote:
Originally Posted by Faust
How can I save score on player death? Now when player dies his score goes to zero.
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(killerid != INVALID_PLAYER_ID) SetPlayerScore(killerid, GetPlayerScore(killerid) + 1); // Sets The Players Score to 1 If Someone Killed Them
    SetPlayerScore(playerid,0); //Sets The player's Score To Nothing.
    SendClientMessage(playerid,COLOR,"You Have Died, Therefore Your Score has Been Reset To 0"); // lets The Player Know His Score has Been Reset.
    return 1;
}
Hope it works
Reply
#3

Quote:
Originally Posted by Faust
How can I save score on player death? Now when player dies his score goes to zero.
Search for dINI/dUDB, you can save any player stats with that.
Reply
#4

Use dudb if you want to make it save when you log out/log in. You can also use it for money, wanted stars, etc.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)