Add the function to add a lightbar (CLIENT)#253
Add the function to add a lightbar (CLIENT)#253Vitroze wants to merge 3 commits intoStyledStrike:mainfrom
Conversation
|
If this PR is accepted, I will update it to make it compatible. |
|
Things should only be created on the client-side when the local player is near the vehicle, and the vehicle is on the player's potential visible set (aka. not dormant). Because of that, I cannot add this pull request as it is due to a few issues:
To manage these client-side, "is-the-vehicle-is-actually-active" conditions, the RangedFeature system was created for Glide. Vehicles use it to figure out when they are "active" (which means not dormant and within the range of the vehicle's With all of that said...There's a elephant in the room: I want to add a more generic prop attachment system, with proper integrations to all light states (turn signals, brake, sirens, etc), so that's really why I'm closing this pull request for now. |
|
I can put it on the server side, which will resolve the main issues. |
Hello,
With this feature, developers will be able to add a lightbar to their vehicle without it necessarily being included. I decided to put this feature and entity on the client side because it is not useful to the server. This entity is only used to modify client bodygroups like a real flashing light.
To create the lightbar, you must create it on the client side:
To modify the target entity when changing the body group, you will need to add the value to the target table:
0ornilis the vehicle entity, and 1 up to the number of lightbars you want the entity to create.ID is managed automatically in the CreateLightbar function. The first function called will have ID
1, then the second will have ID2, and so on.Example: