View Full Version : Create explotion OnPlayerDeath victim

12/11/2013, 09:05 AM
As you red the title create explotion onplayerdeath who got killed or let say victim.

Its just my idea maybe it might be usefull for some fun server.

Now my idea is:

If player1(killer) killed player2(victim) then create an explotion exactly on player2 body right before he fall on the floor/ground. Much better if the last bullet that will kill him will explode. So basically if player2(victim) died then make a explotion to him.

Also the explode should not damage any people around the victim.

12/11/2013, 09:19 AM
public OnPlayerDeath(playerid, killerid, reason)

new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z); //Gets players(victims in your case) position

CreateExplosion(x, y, z, 1, 10.0);//Creates an explosion, at the victims position, with a radius of 10, it shouldn't damage other people, but the fire might.
return 1;
Useful links: