Advertisement
Guest User

Untitled

a guest
Jan 21st, 2020
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.53 KB | None | 0 0
  1. addEventHandler("onClientMarkerHit", resourceRoot, function()
  2.     if source ~= marker then return end
  3.     if getElementDimension(source) ~= getElementDimension(localPlayer) then return end
  4.     if getElementInterior(source) ~= getElementInterior(localPlayer) then return end
  5.     --
  6.     destroyElement(marker)
  7.     marker = false
  8.     destroyElement(blip)
  9.     blip = false
  10.     --
  11.     if pointa == #pointsDriveA then
  12.         if course == "A" then
  13.             ticks.drive = getTickCount()
  14.             gui.drive = false
  15.             ticks.km = getTickCount()
  16.             gui.km = true
  17.             km = 3
  18.         end
  19.         return
  20.     elseif pointb == #pointsDriveB then
  21.         if course == "B" then
  22.             ticks.drive = getTickCount()
  23.             gui.drive = false
  24.             ticks.km = getTickCount()
  25.             gui.km = true
  26.             km = 3
  27.         end
  28.         return
  29.     elseif pointbc == #pointsDriveC then
  30.         if course == "C" then
  31.             ticks.drive = getTickCount()
  32.             gui.drive = false
  33.             ticks.km = getTickCount()
  34.             gui.km = true
  35.             km = 3
  36.         end
  37.         return
  38.     elseif pointd == #pointsDriveD then
  39.         elseif course == "D" then
  40.             ticks.drive = getTickCount()
  41.             gui.drive = false
  42.             ticks.km = getTickCount()
  43.             gui.km = true
  44.             km = 3
  45.         end
  46.         return
  47.     end
  48.     --
  49.     if course == "A" then
  50.         pointa = pointa + 1
  51.         texta = texta + 1
  52.  
  53.         markera = createMarker(pointsDriveA[pointa][1], pointsDriveA[pointa][2], pointsDriveA[pointa][3] - 0.7, "cylinder", 3, 255, 255, 255, 255)
  54.         blipa = createBlipAttachedTo(markera, 41)
  55.     elseif course == "B" then
  56.         pointb = pointb + 1
  57.         textb = textb + 1
  58.  
  59.         markerb = createMarker(pointsDriveB[pointb][1], pointsDriveB[pointb][2], pointsDriveB[pointb][3] - 0.7, "cylinder", 3, 255, 255, 255, 255)
  60.         blipb = createBlipAttachedTo(markerb, 41)
  61.     elseif course == "C" then
  62.         pointc = pointc + 1
  63.         textc = textc + 1
  64.  
  65.         markerc = createMarker(pointsDriveC[pointc][1], pointsDriveC[pointc][2], pointsDriveC[pointc][3] - 0.7, "cylinder", 3, 255, 255, 255, 255)
  66.         blipc = createBlipAttachedTo(markerc, 41)
  67.     elseif course == "D" then
  68.         pointd = pointd + 1
  69.         textd = textd + 1
  70.  
  71.         markerd = createMarker(pointsDriveD[pointd][1], pointsDriveD[pointd][2], pointsDriveD[pointd][3] - 0.7, "cylinder", 3, 255, 255, 255, 255)
  72.         blipd = createBlipAttachedTo(markerd, 41)
  73.     end
  74. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement