SA-MP Forums Archive
Create explotion OnPlayerDeath victim - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Create explotion OnPlayerDeath victim (/showthread.php?tid=475283)



Create explotion OnPlayerDeath victim - enzo27 - 12.11.2013

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.


Re: Create explotion OnPlayerDeath victim - Kyance - 12.11.2013

pawn Код:
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:
https://sampwiki.blast.hk/wiki/Explosion_List
https://sampwiki.blast.hk/wiki/CreateExplosion