SHARE
TWEET

Untitled

a guest Nov 19th, 2019 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ESX = nil
  2.  
  3. Citizen.CreateThread(function()
  4.     while ESX == nil do
  5.       TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
  6.       Citizen.Wait(0)
  7.     end
  8. RegisterNetEvent('hotwire:lockpick')
  9. AddEventHandler('hotwire:lockpick', function()
  10.     local playerPed     = GetPlayerPed(-1)
  11.   local coords      = GetEntityCoords(playerPed)
  12.    
  13.  
  14.     if IsAnyVehicleNearPoint(coords.x, coords.y, coords.z, 5.0) then
  15.     local vehicle = nil
  16.     pBreaking = true
  17.  
  18.         if IsPedInAnyVehicle(playerPed, false) then
  19.             vehicle = GetVehiclePedIsIn(playerPed, false)
  20.         else
  21.             vehicle = GetClosestVehicle(coords.x, coords.y, coords.z, 5.0, 0, 71)
  22.     end
  23.    
  24.     if GetVehicleDoorLockStatus(vehicle) == 1 then
  25.       exports['mythic_notify']:SendAlert('inform', 'Vehicle door is not locked.')
  26.       pBreaking = false
  27.       return
  28.     end
  29.  
  30.         if DoesEntityExist(vehicle) then
  31.             TriggerServerEvent('hotwire:lockpick')
  32.         end
  33.  
  34.     Citizen.Wait(1000)
  35.  
  36.       RequestAnimDict('anim@amb@clubhouse@tutorial@bkr_tut_ig3@')
  37.     while not HasAnimDictLoaded('anim@amb@clubhouse@tutorial@bkr_tut_ig3@') do
  38.       Citizen.Wait(0)
  39.     end
  40.     TaskPlayAnim(GetPlayerPed(-1), 'anim@amb@clubhouse@tutorial@bkr_tut_ig3@' , 'machinic_loop_mechandplayer' ,8.0, -8.0, -1, 1, 0, false, false, false )
  41.     Citizen.CreateThread(function()
  42.       exports['progressBars']:startUI(30000, "Lockpicking...")
  43.  
  44.       Citizen.Wait(30000)
  45.         TriggerServerEvent('esx_addons_gcphone:startCall', 'police', ('Grand Theft Auto in progress.{
  46.           PlayerCoords = { x = pPos.x, y = pPos.y, z = pPos.z },
  47.         })
  48.         Citizen.Wait(2000)
  49.         SetVehicleAlarm(vehicle, true)
  50.         SetVehicleAlarmTimeLeft(vehicle, 30 * 1000)
  51.         SetVehicleDoorsLocked(vehicle, 1)
  52.         SetVehicleDoorsLockedForAllPlayers(vehicle, false)
  53.         ClearPedTasksImmediately(playerPed)
  54.         TaskEnterVehicle(playerPed, vehicle, 10.0, -1, 1.0, 1, 0)
  55.       else
  56.         SetVehicleDoorsLocked(vehicle, 1)
  57.         SetVehicleDoorsLockedForAllPlayers(vehicle, false)
  58.         ClearPedTasksImmediately(playerPed)
  59.         TaskEnterVehicle(playerPed, vehicle, 10.0, -1, 1.0, 1, 0)
  60.       end
  61.     end)           
  62.   end
  63. end)   
  64. end)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top