Skip to content

mahanmoulaei/onesync_vehicle_spawning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a snippet for server-side vehicle spawning in FiveM OneSync

  • It is more optimized than most methods out there [so far]
  • Applies vehicle properties in a better & more optimized way(it doesn't use state bags change handlers, so not all clients will be invoked)
  • Both client-side and server-side exports, spawn the vehicles server-sided
  • Important events are sensitive to exploit and are secured

Client Export

---@param vehicleModel string
---@param vehicleCoords? vector4 - optional
---@param vehicleProperties? {} - optional
---@param cb? function(vehicleEntity, vehicleNetId) - optional
exports["onesync_vehicle_spawning"]:spawnVehicle(vehicleModel, vehicleCoords, vehicleProperties, cb)

Server Export

---@param vehicleModel string
---@param vehicleCoords vector4
---@param vehicleProperties? {} - optional
---@param cb? function(vehicleEntity, vehicleNetId) - optional
exports["onesync_vehicle_spawning"]:spawnVehicle(vehicleModel, vehicleCoords, vehicleProperties, cb)

P.S. Note that this resource is just a SNIPPET

About

Snippet for server-sided vehicle spawning in FiveM OneSync

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages