SA-MP Forums Archive
explode on the vehicle itself - 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 on the vehicle itself (/showthread.php?tid=427695)



explode on the vehicle itself - GoldZoroGrab - 02.04.2013

Hey guys...

there is a function called

CreateExplosion

but it's not helpful for vehicles

when a vehicle is fast the explosion of ^^ function is gonna be behind the vehicle (that's bad)
so i'm asking you if there is a function for creating an explode in the vehicle it self and it make vehicle get blowed up(vehicle died(health 0))


Re: explode on the vehicle itself - Scenario - 02.04.2013

You could either create the explosion a few meters in FRONT of the vehicle, or just use SetVehicleHealth and set it to 0.


Re: explode on the vehicle itself - GoldZoroGrab - 02.04.2013

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
You could either create the explosion a few meters in FRONT of the vehicle, or just use SetVehicleHealth and set it to 0.
wbt if the vehicle was stopped?
and SetVehicleHealth to 0 doesn't kills the vehicle and who is in it directly
it will be fired for 2 seconds or 3 then it will kill people who are in it, and that's bad


Re: explode on the vehicle itself - thefatshizms - 02.04.2013

Why don't you get how fast it's going then, if it's fast enough put the explosion in front of the vehicle if not do it normally.


Re: explode on the vehicle itself - brawrr - 02.04.2013

try first use

PHP код:
SetVehicleVelocity(GetPlayerVehicleID(playerid), 0.00.00.0); 
then explosion


Re: explode on the vehicle itself - GoldZoroGrab - 02.04.2013

Quote:
Originally Posted by thefatshizms
Посмотреть сообщение
Why don't you get how fast it's going then, if it's fast enough put the explosion in front of the vehicle if not do it normally.

that won't work well


Re: explode on the vehicle itself - Finn - 02.04.2013

Have you tried explosive barrels (object)? Car blows up instantly after crashing into that object.


Re: explode on the vehicle itself - GoldZoroGrab - 02.04.2013

Quote:
Originally Posted by brawrr
Посмотреть сообщение
try first use

PHP код:
SetVehicleVelocity(GetPlayerVehicleID(playerid), 0.00.00.0); 
then explosion
well you explain this first? what do it mean
-.-


Re: explode on the vehicle itself - MP2 - 02.04.2013

You can't cause a vehicle to insatntly explode. All you can do is either create an explosive barrel in front of the vehicle (if moving), or use CreateExplosion, or set the health to 0.


Re: explode on the vehicle itself - thefatshizms - 02.04.2013

Quote:
Originally Posted by GoldZoroGrab
Посмотреть сообщение
that won't work well
It would work perfectly fine.