explode no damage
#1

Код:
   	
if(IsPlayerConnected(killerid) && killerid != INVALID_PLAYER_ID && killerid != playerid)
{
   	    new Float:x, Float:y, Float:z;
            GetPlayerPos(playerid, x, y, z);
            CreateExplosion(x, y, z, 12, 5.0);
}
I tried to make this idea if a player got killed he will explode. But the problem when someone is near him they also get damaged coz of the explosion. So how not to damage players near the explosion?
Reply
#2

Quote:
Originally Posted by kbalor
Посмотреть сообщение
Код:
   	
if(IsPlayerConnected(killerid) && killerid != INVALID_PLAYER_ID && killerid != playerid)
{
   	    new Float:x, Float:y, Float:z;
            GetPlayerPos(playerid, x, y, z);
            CreateExplosion(x, y, z, 12, 5.0);
}
I tried to make this idea if a player got killed he will explode. But the problem when someone is near him they also get damaged coz of the explosion. So how not to damage players near the explosion?
mm what about using a timer for set killerid's health 9999 for some seconds till the explosion ends? try it
but before it, use IsPlayerInRangeOfPoint function, to check if killerid is near the x,y,z of the died player..
Reply
#3

Change the radius to a lower value.
Reply
#4

You also don't need to check if the killerid is connect obviously he is if he just got a kill.
Reply
#5

My best option to choose which type of explosion here.

https://sampwiki.blast.hk/wiki/Explosion_List

Maybe type 13 or 1.

I hope you can give me an idea which one is better.

Anyways thanks for the help.
Reply
#6

Type 13 is not visible.
Type 1 is visible but it creates fire.

I'd prefer your first choice though because it's visible, it doesn't create fire, it does damage but using a very low value as radius will not affect the closest players (I believe).
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)