Immediately vehicle explosion
#1

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.
Reply
#2

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

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

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

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

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

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)