kasuganosoras / esx_realparking

🅿️ A real car parking script for FiveM
GNU General Public License v3.0
51 stars 31 forks source link

make persistence vehicle compliant #31

Open paulvilla opened 4 years ago

paulvilla commented 4 years ago

I'm using the script ... to make a complete parking system more complete. The problem is that why do you have to do in realparking that when you park the car you deactivate the persistence of the other script but I don't know how to do it.

Stop a vehicle from being persistent and allow it to be removed as normal. Does not delete the vehicle. Call this when a player puts away a vehicle. Also remember to call this on your admin delete vehicle commands.

  # client event
  TriggerEvent('persistent-vehicles/forget-vehicle', entity)

and when to take the car out of the parking lot:

To make a vehicle persistent, pass its entity to the event below in a client script. For example if you are using ESX you can put this in the call back of the ESX.Game.SpawnVehicle function.

  # client event
  TriggerEvent('persistent-vehicles/register-vehicle', entity)