Save score - 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: Save score (
/showthread.php?tid=62599)
Save score -
Faust - 22.01.2009
How can I save score on player death? Now when player dies his score goes to zero.
Re: Save score -
TheNotorius - 31.12.2009
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
Re: Save score -
Correlli - 31.12.2009
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.
Re: Save score -
Andy_McKinley - 31.12.2009
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.