Not keeping score :(
#9

Quote:
Originally Posted by nilanjay
Посмотреть сообщение
pawn Код:
if(killerid != INVALID_PLAYER_ID)
    {
        SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
    }
This above code of your says that if the killerid is invalid then add +1 to the score of killerid. That's why it is not working.

Try this
pawn Код:
if(killerid != INVALID_PLAYER_ID)
else
    {
        SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
    }
SetPVarInt(playerid, "Dead", 1);
    SendDeathMessage(killerid, playerid, reason); // Shows the kill in the killfeed
return 1;
}
The if statement above doesn't do anything at the moment, what it says is that.. if the killer is not a valid ID (Not connected successfully) then add one score to.. no one? Since the player is not connected.

Use Vince's code instead.
Reply


Messages In This Thread
Not keeping score :( - by Brandondw8 - 14.05.2014, 04:14
Re: Not keeping score :( - by nilanjay - 14.05.2014, 04:38
Re: Not keeping score :( - by Brandondw8 - 14.05.2014, 04:39
Re: Not keeping score :( - by Brandondw8 - 14.05.2014, 04:42
Re: Not keeping score :( - by nilanjay - 14.05.2014, 04:50
Re: Not keeping score :( - by Brandondw8 - 14.05.2014, 04:53
Re: Not keeping score :( - by Vince - 14.05.2014, 08:42
Re: Not keeping score :( - by Brandondw8 - 14.05.2014, 08:46
Re: Not keeping score :( - by Tingesport - 14.05.2014, 09:39
Re: Not keeping score :( - by Brandondw8 - 14.05.2014, 19:02

Forum Jump:


Users browsing this thread: 4 Guest(s)