SetDeathMessage / SendDeathMessage
You can stop the Death Message to appear very simple.
In a_vcmp.inc from "gamemodes" directory is mentioned this functions:
native SetDeathMessage(bool);
So ... I added it on "a_vcmp.inc" from "Include" from Pawno Directory and ... I tested it and ..
Work !!
What is this "Death Message" ?
Death Message = text when a player die.
">>Elvis died."
">>Elvis killed Chuck (Palm) (Face)"
">>Elvis killed team-mate Michael (M4) (Eggs)"
I made 2 commands to Turn ON and Turn OFF the Death Message
Add this on the top:
new Death;
Add this at OnPlayerCommandText:
Start Death Message Command:
else if(strcmp(cmd, "startdeath", true) == 0) {
if(Death == 1) SendClientMessage(playerid,COLOR_RED,"Death Message are already started !");
else {
SendClientMessageToAll(COLOR_YELLOW,"Death Message is Started now !");
print("Death Message is Started now !");
SetDeathMessage(1);
Death = 1;
}
return 1;
}
Stop Death Message Command:
else if(strcmp(cmd, "stopdeath", true) == 0) {
if(Death == 0) SendClientMessage(playerid,COLOR_RED,"Death Message are already stopped !");
else {
SendClientMessageToAll(COLOR_YELLOW,"Death Message is Stopped now !");
print("Death Message is Stopped now !");
SetDeathMessage(0);
Death = 0;
}
return 1;
}
SendDeathMessage - Is very simple to use it .
You can put it at OnPlayerDeath. (for a double death message if is on)
SendDeathMessage(playerid,weapon,killerid,type,bodypart);
I tested the types (with numbers) :
type = 1 => ">>%s killed %s (Weapon Name) (BodyPart)."
type = 2 => ">>%s killed team-mate %s (Weapon Name) (BodyPart)."
type = 3 => ">>%s died."