Players Number
#9

Don't use
Quote:

new deathcount;

public OnPlayerDeath(playerid, killerid, reason)
{
if (IsPlayerInArea (playerid, ...))
{
deathcount++;

if(killerid != INVALID_PLAYER_ID)
{
SetPlayerScore (killerid, deathcount);
}
}

return 1;
}

it will not increment the player's score it will initialize the score and then set it to deathcount
for example if you killed 4 players and you had 5 score you score will be 4 not 9
Quote:

if(killerid != INVALID_PLAYER_ID)
{
new Score = GetPlayerScore(killerid) + 1;
SetPlayerScore (killerid, Score);
}

Reply


Messages In This Thread
Players Number - by IceSKull - 08.04.2017, 11:35
Re: Players Number - by LEOTorres - 08.04.2017, 11:45
Re: Players Number - by Odeath - 08.04.2017, 11:52
Re: Players Number - by IceSKull - 08.04.2017, 11:54
Re: Players Number - by LEOTorres - 08.04.2017, 11:56
Re: Players Number - by IceSKull - 08.04.2017, 11:58
Re: Players Number - by LEOTorres - 08.04.2017, 12:03
Re: Players Number - by IceSKull - 08.04.2017, 12:05
Re: Players Number - by Odeath - 08.04.2017, 12:15
Re: Players Number - by LEOTorres - 08.04.2017, 12:30

Forum Jump:


Users browsing this thread: 1 Guest(s)