STANDALONE CSN Advanced Mechanic & Wash [STANDALONE]

SaifNeon

SaifNeon

Administrative
Joined
Apr 25, 2022
Messages
705
Reaction score
572
Points
93
Credits
31,720

CSN Advanced Mechanic & Wash
:red_car:

CSN Advanced Mechanic & Wash is a comprehensive and standalone script designed to elevate vehicle repair and car wash experiences in FiveM. With detailed NPC interactions, realistic vehicle handling during repairs, and fully configurable options, this script offers an unmatched level of immersion for vehicle-related roleplay scenarios.

Features​

  • Standalone Setup: Functions independently without the need for any frameworks (ESX, QBCore, etc.), making it versatile for any FiveM server setup.
  • Dynamic Vehicle Repairs: Experience custom animations, ped behaviors, and fully synchronized repair sequences. The mechanic NPC handles all repairs while providing visual feedback, creating a truly interactive roleplay environment.
  • Realistic Car Wash Stations: Drive into designated car wash locations, where NPCs will clean your vehicle with distinct animations and adjustable camera angles.
  • Advanced NPC Interactions: Mechanic and car wash NPCs are immune to damage, ragdoll effects, and external player interactions to prevent interruption during services.
  • Driving Restrictions During Services: When repairs or washing are in progress, driving is temporarily restricted to maintain immersion.
  • Custom Blips: Easily locate mechanics and car wash stations with map blips that can be customized for color, sprite, name, and location.
  • Full Customizability: Nearly every aspect of the script can be configured through the config.lua file, from animation sequences to camera settings, ensuring it fits seamlessly into your server’s style.
  • Optimized Performance: Lightweight and thoroughly optimized to ensure minimal impact on server performance, even with multiple players and NPCs interacting simultaneously.

Installation​

  1. Download and Extract: Place the extracted folder into your server’s resources directory.
  2. Add to Server Config: Open your server.cfg and add the following line:
cfg

Copy code


ensure CSN_VehicleServices

  1. Configuration: Open the config.lua file to customize settings such as NPC models, animation sequences, blip details, and more.
  2. Start Your Server: Once configured, restart your server to apply the changes and start using the script.

Configuration Options​

General Settings:

  • config.UseCommands: Enables or disables command-based vehicle repair functionality (true/false).
  • config.playErrorSound: Toggle the error sound effect when an incorrect command is entered (true/false).
  • config.playSuccesSound: Toggle the success sound effect when a command is successfully executed (true/false).
  • config.debugs: Activates debug prints in the F8 console for troubleshooting (true/false).
Mechanic Settings:

  • config.UsemanuallyRepair: Set to true if players need to visit a repair location, or false to enable command-based repairs (/repair).
  • config.pedmodel: Ped model for the mechanic NPC ("s_m_y_xmech_01").
  • config.repairCoords: Coordinates where the repair process takes place.
  • config.pedRepairAnimDict: Dictionary for the ped’s initial animation (e.g., thumbs up gesture).
  • config.pedRepairAnimName: Animation name for the initial ped animation.
  • config.pedRepairStartDelay: Delay before starting the repair sequence (milliseconds).
  • config.ShowRepairRestrictionText: Toggle on-screen text notifications during repairs (e.g., “Under Repair: Driving Disabled”).
Mechanic Animation Settings:

  • config.pedAnimations: List of animations and their durations for the mechanic NPC during the repair process.
    • Example animations include: Thumbs up, Welding, Hammering, Changing tire, etc.
Camera Settings:

  • config.repairCameraCoords1 and config.repairCameraCoords2: Coordinates for the initial and secondary camera positions during the repair.
  • config.repairCameraHeading1 and config.repairCameraHeading2: Camera headings for each camera position.
  • config.repairCameraFOV1 and config.repairCameraFOV2: Field of view (FOV) settings for each camera position.
Vehicle and Ped Movement Settings:

  • config.vehicleParkingCoords and config.vehicleExitCoords: Coordinates for where the vehicle will be parked and where it will exit after repairs.
  • config.vehicleParkingHeading and config.vehicleExitHeading: Vehicle headings (rotation) during parking and exit.
  • config.pedWalkToCoords and config.pedWalkHeading: Coordinates and heading for the mechanic NPC to walk to during the repair.
  • config.repairDuration: Total duration of the repair process (milliseconds).
Blip Settings:

  • config.blips: List of blips to display on the map, with each entry containing the following properties:
    • name: Name of the blip (e.g., "Mechanic Shop" or "Vehicle Wash").
    • coords: Coordinates for the blip’s location.
    • sprite: Sprite used for the blip icon.
    • color: Color of the blip icon.
    • scale: Scale/size of the blip.
    • display: Display settings for the blip.
    • shortRange: True if the blip is only visible within short range.
    • pulsing: Set to true to enable a pulsing effect on the blip.
Car Wash Settings:

  • config.WashDuration: Duration of the vehicle wash (milliseconds).
  • config.WashLocations: List of coordinates for car wash stations.
  • config.PlayerWashPosition: Coordinates where the player and vehicle will be teleported during the wash.
  • config.PedStartPosition and config.PedEndPosition: Starting and ending positions for the NPC during the car wash.
  • config.CamCoords and config.WashCamCoords: Initial and secondary camera positions during the car wash.
  • config.CamHeading and config.WashCamHeading: Camera headings for the car wash process.
  • config.CamFOV and config.WashCamFOV: Field of view (FOV) settings for the car wash cameras.
  • config.PedModel: Ped model used for the car wash NPC.
  • config.AnimDict and config.AnimName: Animation dictionary and name for the NPC during the car wash.
Sound Settings:

  • config.PlayWashSound: Enable or disable sounds during the car wash.
  • config.WashStartSoundName and config.WashSoundSet: Sound settings for the start of the car wash.
Admin Settings:

  • config.deletePedsAdmin: Set to true to allow admins to delete all NPCs (debug purposes).
  • config.adminLicenses: List of admin licenses with permissions for special admin commands.
  • config.commandAdminLicenses: List of admin licenses that have permission to use /clean and /dirt commands.
Debug Mode:

  • config.debugMode: Set to true to enable debug messages for the car wash process (for testing and troubleshooting).

Commands​

:technologist:
Commands​

/repair
/wash admin command
/dirt admin command
/deletepeds admin command

Planned Features & Future Enhancements​

As the CSN Advanced Mechanic & Wash script continues to evolve, we’re planning to introduce new features and enhancements to further improve the user experience and functionality:

  • Bug Fixes & Optimizations:
    Addressing reported bugs and optimizing script performance is a priority. We aim to maintain a smooth and error-free experience for all users.
  • Enhanced Ped Interaction:
    Introducing new ways for players to interact with NPCs, including dialogues and expanded animations. NPCs may provide additional services or information during the repair and wash processes.
  • Additional Service Stations:
    Expanding the number of repair and wash stations available across the map. Each station will have unique configurations and settings, making the experience more dynamic and versatile.
  • Admin Control Panel:
    Developing a dedicated admin panel where server administrators can:
    • Repair or wash other players’ vehicles remotely.
    • Modify station locations and settings directly through an in-game menu.
    • Enable or disable specific features, customize service durations, and manage NPC behaviors.
  • Interactive Admin Tools:
    The admin panel will include options to spawn, delete, or move service NPCs and blips dynamically, allowing for on-the-fly configuration adjustments without needing to restart the server.
  • Customizable Service Levels:
    Adding different service levels for repairs and washes, ranging from quick fixes to detailed, time-consuming processes. Each level will have different animations and durations.


Please, Log in or Register to view URLs content!


Please, Log in or Register to view URLs content!


Please, Log in or Register to view URLs content!



Please, Log in or Register to view URLs content!
 
4,596Threads
10,700Messages
40,122Members
taotao1928Latest member
Top