Specific Vehicle not exploding, Possible? - 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: Specific Vehicle not exploding, Possible? (
/showthread.php?tid=243386)
Specific Vehicle not exploding, Possible? -
Raptor_dewall - 22.03.2011
Hello! I want a car upside down laying on some bricks as for mechanics. Is that possible to do without making it exploding?
(Note that i only want it on ONE vehicle)
Appreciate any help, Thanks!
Raptor.
Re: Specific Vehicle not exploding, Possible? -
Mauzen - 22.03.2011
You could keep setting its health to 1000 with a timer, but Im not sure if this stops it from exploding when it is upside down. Well, it should i think.
pawn Код:
// Call this when you put the vehicle upside down
// vehicleid is the id of the vehicle
SetTimerEx("KeepVehicle", 500, 1, "i", vehicleid);
forward KeepVehicle(vehicleid);
public KeepVehicle(vehicleid)
{
SetVehicleHealth(vehicleid, 1000.0);
}
To put the vehicle upside down you will have to experiment a bit with this:
https://sampwiki.blast.hk/wiki/SetVehicleAngularVelocity
Re: Specific Vehicle not exploding, Possible? -
Too - 22.03.2011
I server I play on has this,its a timer that replenishes the vehicle health.
Re: Specific Vehicle not exploding, Possible? -
Raptor_dewall - 22.03.2011
Wow this is embarresting, But could you fill it in with [ID] For where to put the id so i can just insert it to pawno? I'm retarded when it comes to scripting but a Mapping god. And also the car spawns upsidedown
Thanks :$
Re: Specific Vehicle not exploding, Possible? -
Mauzen - 22.03.2011
Im not your hired scripter

Sorry but i just dont have the time to give everyone here a full code, or i would have no life left. So Im just giving away ideas or code snippets.
vehicleid is the id that you have to replace, as i said in the comment lines. To turn it on spawn use the linked function after you use CreateVehicle or AddStaticVehicle. But you will have to try some different values there, i dont know what exactly you can use to turn it. Try something between 0.1 and 1.0 for x and 0 for y/z.
Re: Specific Vehicle not exploding, Possible? -
Raptor_dewall - 23.03.2011
No worries, Thanks for the help you provided anyways, I will pass it on to our scripter