Posts: 1,547
Threads: 122
Joined: Jun 2014
Reputation:
0
I've made a carbomb system, it works fine but the issue is whenever the player dies through carbomb. The death reason is explosion, how do I show the death reason as carbomb and show the killer ID as the player who bombed him?
Posts: 1,506
Threads: 13
Joined: Jun 2015
Its easy.
PHP код:
//OnPlayerDeath
if(killerid != INVALID_PLAYER_ID)
{
if(reason == 51) // explosion
{
if(/*use a variable that stores the vehicle id that is bombed*/)
{
if(/*use a variable to detect the person who attached the car bomb*/)
{
//format the message
//send it
//etc stuff below and beyond
}
}
}
return 1;
}