SA-MP Forums Archive
Way to detect spraying water with firetruck - 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: Way to detect spraying water with firetruck (/showthread.php?tid=289532)



Way to detect spraying water with firetruck - PowerPC603 - 11.10.2011

Hi,

I have a problem.
I want to create a firefighter class in my gamemode but I don't know how I can detect where you're spraying the water-cannon on top of the firetruck.

I can create the fire-objects, that's no big deal.
But instead of just driving to some location (checkpoint perhaps) and extinguising the fires one by one in code, I want to make it so the player has to actually spray the water onto the fire-object.
I want to detect if the water hits the fire-object (or do a distance-check or whatever) to extinguish the fire.

Is this even possible?


Re: Way to detect spraying water with firetruck - Buzzbomb - 12.10.2011

I dont know how it was Done but It has something to do with centering.. Like if you stick a Textdraw on the fire source area I got to messing around and if the source is center with ur screen