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; }
|
When compiled, I get this:
error 029: invalid expression, assumed zero
Line 230. Heres lines 227 - 233
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid != INVALID_PLAYER_ID)
else
{
SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
}