Jump to content

Some questions


Recommended Posts

Posted

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.

============

Posted

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.

Projects:

Slothbot | Maximap

Posted

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.

Projects:

Slothbot | Maximap

Posted

This is still quite hard. Dont forget you can rotate the turret up/down/left/right so the target position isnt constant.

You could disable movement to make things easier perhaps (up and down that is)

VCP FOREVER!

8298.png

Posted

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

Projects:

Slothbot | Maximap

Posted
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

Projects:

Slothbot | Maximap

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...