SA-MP Forums Archive
Immediately vehicle explosion - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Immediately vehicle explosion (/showthread.php?tid=140864)



Immediately vehicle explosion - ziomal432 - 10.04.2010

I've got some script with planting bomb and the problem is with blowing the vehicle. This is the PAWN code:

Код:
				new Float:pos[3];
				GetVehiclePos(vehicleid, pos[0], pos[1], pos[2]);
				CreateExplosion(pos[0], pos[1], pos[2], 0, 5);
				SetVehicleHealth(vehicleid, -1);
Everything works good, but the real blow is after some time. I want to blow this car immediately. This allows player to run.

If you don't understand, I can create video.


Re: Immediately vehicle explosion - ¤Adas¤ - 10.04.2010

Wouldn't it help to simply add SetPlayerHealth(playerid, 0)??


Re: Immediately vehicle explosion - ziomal432 - 10.04.2010

No, I need CreateExplosion too, but when I use SetVehicleHealth, there is delay too


Re: Immediately vehicle explosion - ¤Adas¤ - 10.04.2010

Why do you wanna make car to explode at the certain moment?


Re: Immediately vehicle explosion - ziomal432 - 11.04.2010

http://ziomal.hostei.com/videos/ExplosionProblem.wmv

It's 600kb, watch it on full screen.


Re: Immediately vehicle explosion - Dark_Kostas - 11.04.2010

Add something like that under "SetVehicleHealth(vehicleid, -1);"
pawn Код:
if(IsPlayerInVehicle(playerid, vehicleid)) SetPlayerHealth(playerid, 0);



Re: Immediately vehicle explosion - ziomal432 - 11.04.2010

Thanks. Now it works good. I think this topic is stupid