11.05.2012, 15:49
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.
Although if every player is part of either grove or balla
will work aswell
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);
}
}
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
SetPlayerScore(killerid, GetPlayerScore(killerid)+10);
GivePlayerMoney(killerid, 15000);
}