Fix this small code ill +rep
#2

Remove the for (new i = 0; i < MAX_PLAYERS; i++) because that makes it so everyone gains the score if theres a kill if im right.
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    kill[killerid]++;
    death[playerid]++;
    SetPlayerScorekillerid,GetPlayerScore(killerid)+1); //changed playerid to killerid
    SetPlayerMoney(killerid,GetPlayerMoney(killerid)+1000); //changed playerid to killerid because you have the person who died the cash and points.
    SendClientMessage(killerid,COLOR_YELLOW,"You recieved +1000 money & +1 score.");
}
if this doesnt work without the (new i = 0; i < MAX_PLAYERS; i++) you could try adding it back but i reccomend trying it without first and with the above code. good luck ;0!
Reply


Messages In This Thread
Fix this small code ill +rep - by FireWarrior101 - 27.09.2013, 11:46
Re: Fix this small code ill +rep - by Voxel - 27.09.2013, 11:50
Re: Fix this small code ill +rep - by Konstantinos - 27.09.2013, 11:52

Forum Jump:


Users browsing this thread: 1 Guest(s)