Giving player a score
#1

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);
Reply
#2

You mean kill streak ?
Reply
#3

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

here you go

put it under onplayerdeath

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

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);
Reply
#6

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.
Reply
#7

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.
Reply
#8

Thanks KaliKs, rep+
Reply


Forum Jump:


Users browsing this thread: 6 Guest(s)