SA-MP Forums Archive
Give 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: Give Score (/showthread.php?tid=260627)



Give Score - Admigo - 09.06.2011

Heey guys,
How can i give a player score by +1 and not with setting it.
Example:If the player kills someone he gets 1 score +.
Thanks Admigo.


Re: Give Score - iGetty - 09.06.2011

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    // Adds 1 to this killer's score.
    if(killerid != INVALID_PLAYER_ID) SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
    return 1;
}



Re: Give Score - dr.pepper - 09.06.2011

Isn't that already default in a server?
Oh sorry. Diddn't read..


Re: Give Score - iGetty - 09.06.2011

Nope, you have to set it.


Re: Give Score - dr.pepper - 09.06.2011

Oops, forgot because I already have that setup, I'm kind of used to it that it's like an invisible part of the script if you know what I mean.


Re: Give Score - Admigo - 09.06.2011

Thanks guys


Re: Give Score - iGetty - 09.06.2011

Quote:
Originally Posted by dr.pepper
Посмотреть сообщение
Oops, forgot because I already have that setup, I'm kind of used to it that it's like an invisible part of the script if you know what I mean.
I get you buddy

Quote:
Originally Posted by admigo
Посмотреть сообщение
Thanks guys
No problem matey