onplayerdeath - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: onplayerdeath (
/showthread.php?tid=313839)
onplayerdeath -
Face9000 - 27.01.2012
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?
Re: onplayerdeath -
zxc1 - 27.01.2012
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);
}
Re: onplayerdeath -
Face9000 - 27.01.2012
Thanks