death Message help - 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: death Message help (
/showthread.php?tid=334690)
death Message help -
ThamburaaN - 15.04.2012
i want to make it like, if a player get killed by an admin with a command the death icon at the death window should be different. i put that and it worked, but at the same time on the death window i see 2 deaths messages. Fake Pistol

and the icon i used.
Re: death Message help -
ViniBorn - 15.04.2012
Post OnPlayerDeath
Re: death Message help -
ThamburaaN - 15.04.2012
pawn Code:
public OnPlayerDeath(playerid, killerid, reason)
{
new string[64], fName[MAX_PLAYER_NAME];
GetPlayerName(playerid,fName,MAX_PLAYER_NAME);
format(string,sizeof(string),"%s (%d) Died.",fName,playerid);
SendClientMessageToAll(0xAA3333AA,string);
SendDeathMessage(killerid, playerid, reason);
SetPlayerScore(killerid,GetPlayerScore(killerid)+2);
SetPlayerScore(playerid,GetPlayerScore(playerid)-1);
return 1;
}
i Use Luxadmin admin System. and the OnplayerDeath from GM
Edit: i added this death Message on Admin System admin kill Script.
pawn Code:
SendDeathMessage(INVALID_PLAYER_ID,player1,40);
Re: death Message help -
ViniBorn - 15.04.2012
So you have two different SendDeathMessage?
Re: death Message help -
ThamburaaN - 15.04.2012
yea i have one in OnPlayerDeath and one in /akill which is a command to kill other players.
Re: death Message help -
ViniBorn - 15.04.2012
Let only one of them, therefore appear two messages.
Re: death Message help -
ThamburaaN - 15.04.2012
but how abt for other deaths. like if a player get killed by himeself, or someone else kill him. then the message wont appear
Re: death Message help -
ViniBorn - 15.04.2012
Something like this.
Adapt this...
pawn Code:
if(KILLED_BY_ADMIN)
SendDeathMessage(INVALID_PLAYER_ID,player1,40);
else
SendDeathMessage(killerid,player1,reason);
Re: death Message help -
ThamburaaN - 15.04.2012
how to put like insted of KILLED_BY_ADMIN , only for that Command /akill
Re: death Message help -
ViniBorn - 15.04.2012
I'm sorry. I didn't understand.