Skip to content

New vehicle features functions (setVehicleSpecialFeatureEnabled) #4330

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

FileEX
Copy link
Contributor

@FileEX FileEX commented Aug 1, 2025

This PR is the first step toward resolving #1861.

It introduces a new set of functions that allow manipulation of vehicle features. For now, only the water_cannon functionality is supported - additional features will be added in separate future PRs. These functions allow enabling or disabling the water cannon support.

Importantly, the functionality works both on a model level and on specific vehicles - this means, for example, you could implement a system where a firetruck can't use its water cannon if its tank is empty!

It works for both allocated vehicles and vanilla game vehicles.

Syntax

bool setVehicleSpecialFeatureEnabled(vehicle/int modelOrVehicle, string feature, bool enabled)
bool isVehicleSpecialFeatureEnabled(vehicle/int modelOrVehicle, string feature)

Available features:

  • water_cannon
image

@FileEX FileEX closed this Aug 1, 2025
@FileEX FileEX reopened this Aug 1, 2025
@ColombuxMaximus
Copy link
Contributor

Huge W
Aim FOV aswell 🫡

@Fernando-A-Rocha
Copy link
Contributor

Fernando-A-Rocha commented Aug 2, 2025

Wow, thank you for this contribution!
This fix and addition has been awaited for the past years. I can say that I will continue working on the community resource "newmodels" that is a tool/library to easily manage added models and their features in servers, with full sync.
This feature will be included :)

@Fernando-A-Rocha
Copy link
Contributor

Towing ability for tow truck and other trucks like Roadtrain will be super cool. Afaik for this to work the DFF of the vehicle needs to have a special dummy that is positioned at the tow hitch (where the trailer/vehicle will attach), right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants