gimicze / firescript

OneSync Infinity compatible fire script for FiveM.
https://forum.cfx.re/t/release-fire-script-onesync/1751606
GNU General Public License v3.0
87 stars 35 forks source link

added alarm when fire started #34

Closed DA-AshleyJ closed 2 months ago

DA-AshleyJ commented 6 months ago

I have added a siren to a FireStation when dispatch is enabled to allow more realism.

30 seconds of a siren then it stops. This is configurable in the config.lua under

Config.FireLocations = {

Main FireStation for Siren

{ x = 205.84, y = -1651.13, z = 29.8 }

}

gimicze commented 6 months ago

Thanks! Looks elegant. Unfortunately I currently don't have means of confirming proper functionality, so I will leave this request open for now.

One thing I noticed is that the whole array of fire station coordinates is passed via the event to all clients. While I am sure this works, it's an unnecessary data traffic (server -> all clients, i.e. every client separately) as the client script can access the config directly.

But again, thank you for the contribution, I'm sure many people will appreciate this 😁

EDIT: I noticed another problem, will comment directly in code.

DA-AshleyJ commented 6 months ago

Thanks! Looks elegant. Unfortunately I currently don't have means of confirming proper functionality, so I will leave this request open for now.

One thing I noticed is that the whole array of fire station coordinates is passed via the event to all clients. While I am sure this works, it's an unnecessary data traffic (server -> all clients, i.e. every client separately) as the client script can access the config directly.

But again, thank you for the contribution, I'm sure many people will appreciate this 😁

EDIT: I noticed another problem, will comment directly in code.

Hey buddy, yep I realsied a mistake.

I am committing new code now.

gimicze commented 2 months ago

Similar functionality implemented in #35 .