SendDeathMessage to admins -
SKAzini - 03.02.2013
Is there any way to only SendDeathMessage to admins instead of broadcasting it to the whole server?
Something like this:
pawn Код:
public OnPlayerDeath
{
for(new i; i < MAX_PLAYERS; i++)
{
if(UserStats[i][Admin] > 0) SendDeathMessage..
}
}
Re: SendDeathMessage to admins -
Mean - 03.02.2013
No, there isn't such a function, but you can always make a textdraw with the killfeed in it.
AW: SendDeathMessage to admins -
Nero_3D - 03.02.2013
Was mistaken, do as Mean told you
Re: SendDeathMessage to admins -
]Rafaellos[ - 03.02.2013
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(IsPlayerAdmin(playerid))
{
SendDeathMessage(killerid, playerid, reason);
}
return 1;
}
Try this...
Re: SendDeathMessage to admins -
Mean - 03.02.2013
Quote:
Originally Posted by ]Rafaellos[
pawn Код:
public OnPlayerDeath(playerid, killerid, reason) { if(IsPlayerAdmin(playerid)) { SendDeathMessage(killerid, playerid, reason); } return 1; }
Try this...
|
That won't work. That code will send a death message to everyone if the player who died was an admin.
Re: SendDeathMessage to admins -
]Rafaellos[ - 03.02.2013
Are you sure? Because if you add only the SendDeathMessage the message will go to everyone, so check if is admin and then send it.
I will test it anw, you may have right!
EDIT: I just test it and working for me.
Re: SendDeathMessage to admins -
Mean - 03.02.2013
Quote:
Originally Posted by ]Rafaellos[
Are you sure? Because if you add only the SendDeathMessage the message will go to everyone, so check if is admin and then send it.
I will test it anw, you may have right!
EDIT: I just test it and working for me.
|
ofc, you were an admin, you died and you got death msg
With your code, when an ADMIN dies, a death message gets sent to EVERYONE.
Re: SendDeathMessage to admins -
Fergy - 03.02.2013
No, only one way:
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
for(new i; i < MAX_PLAYERS; i++)
{
if(UserStats[i][Admin] > 0) SendDeathMessage..
}
}
Re: SendDeathMessage to admins -
Mean - 03.02.2013
Quote:
Originally Posted by Fergy
No, only one way:
pawn Код:
public OnPlayerDeath(playerid, killerid, reason) { for(new i; i < MAX_PLAYERS; i++) { if(UserStats[i][Admin] > 0) SendDeathMessage.. } }
|
SendDeathMessage sends a death message to
everyone (it doesn't have a parameter which specifies to who it will be sent), that means your code would spam the death message depending on the amount of administrators online.
The only way to do what he is asking for is to do it with textdraws.
Re: SendDeathMessage to admins -
Fergy - 03.02.2013
Quote:
Originally Posted by Mean
SendDeathMessage sends a death message to everyone (it doesn't have a parameter which specifies to who it will be sent), that means your code would spam the death message depending on the amount of administrators online.
|
Ou yeah, sorry...