SA-MP Forums Archive
Very easy! - 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: Very easy! (/showthread.php?tid=125779)



Very easy! - Daniel_June - 05.02.2010

Hey man.
I tried out doing a thing that comes up, so admin can see when people kill eachother.
Example: (Player) killed (Player) - (Weapon)


Re: Very easy! - CrucixTM - 05.02.2010

You wanna know how to do this or what?

Code:
public OnPlayerDeath(playerid, killerid, reason)
{
	SendDeathMessage(killerid, playerid, reason);
}



Re: Very easy! - Daniel_June - 05.02.2010

So only admins can see it?


Re: Very easy! - MadeMan - 05.02.2010

You can't use SendDeathMessage for admins only. You can make a client message for that.


Re: Very easy! - Mike Garber - 05.02.2010

pawn Code:
public OnPlayerDeath(playerid, killerid, reason)
{
for(new i=0; i<MAX_PLAYERS; i++){
if(IsPlayerAdmin(i)){
SendDeathMessage(killerid, playerid, reason);
}}
return 1;
}

Untested though.