onplayerdeath
#1

Hello,i've another problem.

I'm using OnPlayerDeath if a player as TEAM_COP has killed another player that is TEAM_CIV.

pawn Код:
if(gTeam[playerid] == TEAM_COP) && killerid gTeam[playerid] == TEAM_CIV
    {
    SendClientMessage(playerid, COLOR_BLUE, "You killed a civilian! -2 score for you.");
    SetPlayerScore(playerid, GetPlayerScore(playerid) -2);
    }
But i'm getting errors,what's wrong?
Reply
#2

I think it should be like that:

pawn Код:
if(gTeam[killerid] == TEAM_COP && gTeam[playerid] == TEAM_CIV)
    {
    SendClientMessage(playerid, COLOR_BLUE, "You killed a civilian! -2 score for you.");
    SetPlayerScore(playerid, GetPlayerScore(playerid) -2);
    }
Reply
#3

Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)