Jump to content

Some questions


Recommended Posts

Hey, is it possible to make a timer for onVehicleFire, like when a player is in a firetruck, he only can use the vehicle fire 2 minutes. And then it's empty, and he have to refill it. And for a hydra, 10x a fire.

Is it also possible, when a player hits something very fast, he will be go trough the front window (like gta4), but not when a player is up trough a wall, because then he will be warped into the wall.

Link to comment

Could you please clarify the first question? Because I doubt that you can "use" a fire while in a Firetruck... Unless you built a flamethrower on top of it. ^^

And about the second question, it should be possible yes. It'll just require some calculation I guess.

Link to comment

You mean Extinguish? ("Blussen" in Dutch)

Then it might be possible, but you'd need to calculate the arch of the water and also get the turret rotation. For the turret rotation you can use getVehicleTurretPosition (note that you need to do math.deg on the coordinates to get the coordinates in degrees, as they're in radians) Then with some heavy calculations you can make the extinguishing.

Link to comment

but what does it have to do with the turret position? isn't he trying to simulate a tank of water that is becoming more and more empty?

well when reading the first post again he says something about a timer of two minutes, well making the turret only work for two minutes is really easy using setTimer

Link to comment

From what I understood he wants 2 things:

1. He wants the tank of the fire truck to become empty over time.

2. He wants to be able to extinguish vehicle fire with the fire trucks. I guess he means the fire that appears if vehicle health < 250.

This is why the turret "position" is required.

Also, setTimer might be an easy way to do it indeed, except that the timer will continue running unless disabled and there's no simple way to get the time left until the timer runs out. (only getTickCount() might be a way I think)

So ye, it's a small puzzle to make the first thing working. But not nearly as hard as the second one... :P

Link to comment

good luck extinguish this fire in the 5 seconds before the explosion :| also, the settimer was meant for the thing mentioned in the first post which sounds like he just wanted to disable it two minutes after vehicle enter.

actually i don't see what makes you think he wants to extinguish vehicle fire, for the hydra thing you can just count

Link to comment
You mean Extinguish? ("Blussen" in Dutch)

Then it might be possible, but you'd need to calculate the arch of the water and also get the turret rotation. For the turret rotation you can use getVehicleTurretPosition (note that you need to do math.deg on the coordinates to get the coordinates in degrees, as they're in radians) Then with some heavy calculations you can make the extinguishing.

Yes, and also that the fire truck can be empty of water.

It's not only the first post that matters you know. :P

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...