Advertisement
Guest User

Untitled

a guest
Apr 19th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.34 KB | None | 0 0
  1. Markers = {}
  2. Markers.markerPositions = {}
  3. Markers.abortMarkerPosition = nil
  4.  
  5. function Markers.StartMarkers()
  6. Markers.InitNotOnDutyMarkers()
  7.  
  8. Citizen.CreateThread(function ()
  9. while true do
  10. Citizen.Wait(10)
  11.  
  12. for _, markerPosition in pairs(Markers.markerPositions) do
  13. Markers.DrawMarker(markerPosition, Config.Markers.StartColor)
  14. end
  15.  
  16. if Markers.abortMarkerPosition ~= nil then
  17. Markers.DrawMarker(Markers.abortMarkerPosition, Config.Markers.AbortColor)
  18. end
  19. end
  20. end)
  21. end
  22.  
  23. function Markers.ResetMarkers()
  24. Markers.StopMarkers()
  25. Markers.InitNotOnDutyMarkers()
  26. end
  27.  
  28. function Markers.StopMarkers()
  29. Markers.markerPositions = {}
  30. Markers.StopAbortMarker()
  31. end
  32.  
  33. function Markers.SetMarkers(markersTable)
  34. Markers.markerPositions = markersTable
  35. end
  36.  
  37. function Markers.InitNotOnDutyMarkers()
  38. for _, markerPosition in pairs(Config.Routes) do
  39. table.insert(Markers.markerPositions, markerPosition.SpawnPoint)
  40. end
  41. end
  42.  
  43. function Markers.StartAbortMarker(abortMarkerPosition)
  44. Markers.abortMarkerPosition = abortMarkerPosition
  45. end
  46.  
  47. function Markers.StopAbortMarker()
  48. Markers.abortMarkerPosition = nil
  49. end
  50.  
  51. function Markers.DrawMarker(coords, markerColor)
  52. local markerSize = Config.Markers.Size
  53. DrawMarker(27, -- type, MarkerTypeChevronUpx3
  54. coords.x, -- posX
  55. coords.y, -- posY
  56. coords.z +0.1, -- posZ
  57. 0, -- dirX
  58. 0, -- dirY
  59. 0, -- dirZ
  60. 0.0, -- rotX
  61. 180.0, -- rotY
  62. 0.0, -- rotZ
  63. 1, -- scaleX
  64. 1, -- scaleY
  65. 1, -- scaleZ
  66. markerColor.r, -- red
  67. markerColor.g, -- green
  68. markerColor.b, -- blue
  69. markerColor.a, -- alpha
  70. false, -- bobUpAndDown
  71. true, -- faceCamera
  72. 2, -- p19 "Typically set to 2. Does not seem to matter directly."
  73. 1, -- rotate
  74. 0, -- textureDict
  75. 0, -- textureName
  76. 0 -- drawOnEnts
  77. )
  78. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement