SA-MP Forums Archive
Suicidal death problem - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Suicidal death problem (/showthread.php?tid=73358)



Suicidal death problem - David_Omid - 14.04.2009

Ok, I tried to do this:

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
  if(playerid == killerid)
	{
	  SendClientMessage(playerid,COLOR_WHITE,"You killed yourself");
	}
}
However, this doesn't work...any ideas on how to make it work?


All help would be greatly appreciated, thanks


Re: Suicidal death problem - LarzI - 14.04.2009

If suicide is the reason, you didn't "kill yourself" (killerid != playerid)


Re: Suicidal death problem - Think - 14.04.2009

Quote:
Originally Posted by David_Omid
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
  if(killerid == INVALID_PLAYER_ID)
    {
      SendClientMessage(playerid,COLOR_WHITE,"You killed yourself");
    }
}



Re: Suicidal death problem - David_Omid - 14.04.2009

I dunno...I tried that and it didn't work