Killing
#7

iGetty, I don't think you need to GetPlayerMoney(killerid)+15000, just 15000 will work, otherwise you're giving current money + 15000, so 30000+15000=45000, as you're using give and not reset.

Also the playerid seemed incorrect.

So with that given, I believe the code should work fine like this.

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(gTeam[killerid] == Balla && gTeam[playerid] == Grove)
    {
        SetPlayerScore(killerid, GetPlayerScore(killerid)+10);
        GivePlayerMoney(killerid, 15000);
    }
    if(gTeam[killerid] == Grove && gTeam[playerid] == Balla)
    {
        SetPlayerScore(killerid, GetPlayerScore(killerid)+10);
        GivePlayerMoney(killerid, 15000);
    }
}
Although if every player is part of either grove or balla
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
        SetPlayerScore(killerid, GetPlayerScore(killerid)+10);
        GivePlayerMoney(killerid, 15000);
}
will work aswell
Reply


Messages In This Thread
Killing - by Karl[NDZ] - 11.05.2012, 15:25
Re: Killing - by iGetty - 11.05.2012, 15:34
Re: Killing - by Karl[NDZ] - 11.05.2012, 15:35
Re: Killing - by iGetty - 11.05.2012, 15:38
Re: Killing - by Karl[NDZ] - 11.05.2012, 15:41
Re: Killing - by iGetty - 11.05.2012, 15:45
Re: Killing - by Revo - 11.05.2012, 15:49
Re: Killing - by Karl[NDZ] - 11.05.2012, 15:49
Re: Killing - by [MG]Dimi - 11.05.2012, 15:58

Forum Jump:


Users browsing this thread: 1 Guest(s)