explode no damage - 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: explode no damage (
/showthread.php?tid=479530)
explode no damage -
kbalor - 05.12.2013
Код:
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?
Re: explode no damage -
Sawalha - 05.12.2013
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..
Re: explode no damage -
Konstantinos - 05.12.2013
Change the radius to a lower value.
Re: explode no damage -
Pottus - 05.12.2013
You also don't need to check if the killerid is connect obviously he is if he just got a kill.
Re: explode no damage -
kbalor - 05.12.2013
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.
Re: explode no damage -
Konstantinos - 05.12.2013
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).