Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Verifie si le joueurs est dans un vehicule ou pas
- function IsInVehicle()
- local ply = PlayerPedId()
- if IsPedSittingInAnyVehicle(ply) then
- return true
- else
- return false
- end
- end
- function recolte(currentVehicle, isGoodVehicle)
- if (PlayerData.job.name == 'police') then
- ESX.ShowNotification(_U('police_methylamine'))
- else
- if currentVehicle == 0 then
- ESX.ShowNotification(_U('need_vehicle'))
- return
- end
- if isGoodVehicle == false then
- ESX.ShowNotification(_U('bad_vehicle'))
- else
- if currentCharge >= 10000 then
- currentCharge = 10000
- ESX.ShowNotification(_U('full_vehicle'))
- Citizen.Wait(1000)
- ESX.ShowNotification(_U('full_vehicle_2'))
- Citizen.Wait(10000)
- ESX.ShowNotification(_U('full_vehicle_3'))
- else
- currentCharge = math.min(10000, currentCharge + 10)
- DecorSetInt(currentVehicle,'illegal_chargeMeth', currentCharge)
- ESX.ShowNotification(_U('filling_vehicle'))
- Citizen.Wait(100)
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement