i need help in OnPlayerDeath
#5

Quote:
Originally Posted by SuperViper
Посмотреть сообщение
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    new Message[128];

   [B] if(killerid == INVALID_PLAYER_ID)[/B]
    {
        format(Message, 128, "{FFAF00}%s {B8FF02}has {F81414}died", PlayerName(playerid), reason);
    }
    else
    {
        format(Message, 128, "{FFAF00}%s {B8FF02}has {F81414}killed {FFAF00}%s", PlayerName(killerid), PlayerName(playerid));
    }

    SendClientMessageToAll(COLOR_RED, Message);
    return 1;
}
When a player suicides, it doesn't show that they killed themselves. It shows that nobody (INVALID_PLAYER_ID) killed them.
That's because of killerid should equal player id
Код:
 if(killerid == playerid)
As shown in the posts above.
Reply


Messages In This Thread
i need help in OnPlayerDeath - by dr.lozer - 28.10.2012, 18:20
Re: i need help in OnPlayerDeath - by adithegman - 28.10.2012, 18:45
Re: i need help in OnPlayerDeath - by Lordzy - 29.10.2012, 02:40
Re: i need help in OnPlayerDeath - by SuperViper - 29.10.2012, 02:57
Re: i need help in OnPlayerDeath - by Stu1 - 29.10.2012, 03:28
Re: i need help in OnPlayerDeath - by dr.lozer - 29.10.2012, 08:42
Re: i need help in OnPlayerDeath - by gtakillerIV - 29.10.2012, 10:05

Forum Jump:


Users browsing this thread: 1 Guest(s)