Advertisement
Guest User

Untitled

a guest
Sep 15th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. --Meter na mala das viaturas
  2. RegisterCommand('ccorpo', function(source, args, rawCommand)
  3. local pos = GetEntityCoords(GetPlayerPed(-1), false)
  4. local vehicle = GetClosestVehicle(pos.x, pos.y, pos.z, 5.0, 0, 71)
  5. if DoesEntityExist(vehicle) and GetVehicleDoorLockStatus(vehicle) == 1 and not kidnapped then
  6. if not isIntrunk then
  7. AttachEntityToEntity(GetPlayerPed(-1), vehicle, -1, 0.0, -2.2, 0.5, 0.0, 0.0, 0.0, false, false, false, false, 20, true)
  8. RaiseConvertibleRoof(vehicle, false)
  9. if IsEntityAttached(GetPlayerPed(-1)) then
  10. RequestAnimDict('timetable@floyd@cryingonbed@base')
  11. while not HasAnimDictLoaded('timetable@floyd@cryingonbed@base') do
  12. Citizen.Wait(1)
  13. end
  14. TaskPlayAnim(GetPlayerPed(-1), 'timetable@floyd@cryingonbed@base', 'base', 1.0, -1, -1, 1, 0, 0, 0, 0)
  15. end
  16. end
  17. isIntrunk = true
  18. end
  19. end)
  20.  
  21. RegisterCommand('rcorpo', function(source, args, rawCommand)
  22. local pos = GetEntityCoords(GetPlayerPed(-1), false)
  23. local vehicle = GetClosestVehicle(pos.x, pos.y, pos.z, 5.0, 0, 71)
  24. if DoesEntityExist(vehicle) and GetVehicleDoorLockStatus(vehicle) == 1 and not kidnapped then
  25. if isIntrunk then
  26. DetachEntity(GetPlayerPed(-1), 0, true)
  27. SetEntityVisible(GetPlayerPed(-1), true)
  28. ClearPedTasksImmediately(GetPlayerPed(-1))
  29. end
  30. isInTrunk = false
  31. end
  32. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement