SA-MP Forums Archive
script when you touch another car you die/explode - 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: script when you touch another car you die/explode (/showthread.php?tid=49684)



script when you touch another car you die/explode - doonbugie - 04.09.2008

could someone make me a small script for pawno so when you touch another car with your car your car explodes or you die


Re: script when you touch another car you die/explode - bineboy - 04.09.2008

can you post that in script request please?


Re: script when you touch another car you die/explode - Extremo - 04.09.2008

Not possible, even tho you could check the damage of the vehicle it could crash with everything, you can check the pos from a car and check if the car is near the next car and its still not possible because you could just park next to him or anything, so my opinion is, forget it, dunno if someone thinks he can do it tho. Anyways good luck and as above already said, post it in the script request section.

Cheers
Extremo


Re: script when you touch another car you die/explode - doonbugie - 04.09.2008

but could I increase the damage level when the car hits another car? to 50%?


Re: script when you touch another car you die/explode - mamorunl - 04.09.2008

no, you cannot detect that.

what you CAN do is:

run a timer each &amount of time.
check if the vehicle health has dropped
set the vehicle to a burning or something health

NOTE: you cannot detect carhits


Re: script when you touch another car you die/explode - maij - 16.03.2009

afcourse you can, but it can require loads of computer efforts

you can save vehicle health into variables

then, make a variable that holds if its damaged

i will give a hint, use onplayerupdate, you can also detect if someone attacked someone else ^_^



Re: script when you touch another car you die/explode - Cueball - 16.03.2009

Pfft, are you people kidding? Of course it is possible, you just need to take the time. You could try something going on damage, but it wouldn't be very accurate. How you could do it and achieve the most accurate result would be to map the maximum dimensions of each vehicle, and check if the player gets within those dimensions of the vehicle's position. It would take a lot of work, but if you wanted a perfect system, it would be necessary.

~Cueball~



Re: script when you touch another car you die/explode - MenaceX^ - 16.03.2009

Quote:
Originally Posted by [NT
Extremo ]
Not possible, even tho you could check the damage of the vehicle it could crash with everything, you can check the pos from a car and check if the car is near the next car and its still not possible because you could just park next to him or anything, so my opinion is, forget it, dunno if someone thinks he can do it tho. Anyways good luck and as above already said, post it in the script request section.

Cheers
Extremo
I think ****** has something to do it, I ain't sure about it.

Also if his area has the same Z. He can check when the Z is higher than usualy (player stands on a vehicle) and then create an explosion on him.