how to detect if player killed himself
#8

Quote:
Originally Posted by [MWR]Blood
Посмотреть сообщение
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(IsPlayerConnected(playerid))
    {
        //Code for killerid goes here
    }
    //Code for playerid goes here
    return 1;
}
Blood, I think it should be if(IsPlayerConnected(killerid)), instead of playerid. But that isn't really important.
______________________________
Now on topic, OnPlayerDeath has another parameter, reason, I'm pretty sure you noticed it. You can see the reasons here.
Also take a look to SendDeathMessage and OnPlayerDeath.

In the wiki says: "if killerid was INVALID_PLAYER_ID the player killed themselves (i.e. falling)"

Probably, this isn't the answer which you want, but give a try.
Reply


Messages In This Thread
how to detect if player killed himself - by detter - 22.08.2012, 11:59
Re: how to detect if player killed himself - by clarencecuzz - 22.08.2012, 12:06
Re: how to detect if player killed himself - by detter - 22.08.2012, 12:18
Re: how to detect if player killed himself - by [MWR]Blood - 22.08.2012, 12:19
Re: how to detect if player killed himself - by detter - 22.08.2012, 12:24
Re: how to detect if player killed himself - by RedJohn - 22.08.2012, 12:29
Re: how to detect if player killed himself - by detter - 22.08.2012, 12:31
Re: how to detect if player killed himself - by [DOG]irinel1996 - 22.08.2012, 12:32
Re: how to detect if player killed himself - by clarencecuzz - 22.08.2012, 12:40
Re: how to detect if player killed himself - by [MWR]Blood - 22.08.2012, 12:55

Forum Jump:


Users browsing this thread: 1 Guest(s)