death Message help
#1

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.
Reply
#2

Post OnPlayerDeath
Reply
#3

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);
Reply
#4

So you have two different SendDeathMessage?
Reply
#5

yea i have one in OnPlayerDeath and one in /akill which is a command to kill other players.
Reply
#6

Let only one of them, therefore appear two messages.
Reply
#7

but how abt for other deaths. like if a player get killed by himeself, or someone else kill him. then the message wont appear
Reply
#8

Something like this.

Adapt this...
pawn Code:
if(KILLED_BY_ADMIN)
    SendDeathMessage(INVALID_PLAYER_ID,player1,40);
else
    SendDeathMessage(killerid,player1,reason);
Reply
#9

how to put like insted of KILLED_BY_ADMIN , only for that Command /akill
Reply
#10

I'm sorry. I didn't understand.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)