SA-MP Forums Archive
Giving player a 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)
+--- Thread: Giving player a score (/showthread.php?tid=507758)



Giving player a score - SupaFool - 19.04.2014

Hello everyone,

I'm need some help here at the moment i'm making a TDM and i'm trying to get players to get the score. They get first kill with 1+ but the 2nd kill they get 2+ extra.. if anyone knows the problem can you please help me!

Code:

SetPlayerScore(killerid, GetPlayerScore(playerid) + 1);


Re: Giving player a score - ChandraLouis - 19.04.2014

You mean kill streak ?


Re: Giving player a score - SupaFool - 19.04.2014

Ahh no, what im trying to say that i want other players to get 1 score each kills cause im making a TDM


Re: Giving player a score - KaliKs - 19.04.2014

here you go

put it under onplayerdeath

pawn Код:
SetPlayerScore(killerid,GetPlayerScore(killerid)+1);



Re: Giving player a score - Flake. - 19.04.2014

I don't quite understand what you're trying to do but this code doesn't really make sence

pawn Код:
SetPlayerScore(killerid, GetPlayerScore(playerid) + 1); //You're setting the killers score to +1 what ever the player they killed score was.

//Shouldn't it be
SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);



Re: Giving player a score - KaliKs - 19.04.2014

well lets say like this when i used it on my server what i made it worked well you killed someone you got +1 score if they killed you they got +1 score.


Re: Giving player a score - Sgt.TheDarkness - 19.04.2014

Quote:
Originally Posted by KaliKs
Посмотреть сообщение
well lets say like this when i used it on my server what i made it worked well you killed someone you got +1 score if they killed you they got +1 score.
OnPlayerDeath is called everytime a player is killed, so in term. The killer (killerid) will always be the player who killed the other player (playerid).


This works either way for each player.


Re: Giving player a score - SupaFool - 19.04.2014

Thanks KaliKs, rep+