Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.31 KB | None | 0 0
  1. -- Scripted by Woopi/Lucas Miller
  2. local table = { -- Here you can add more markers | markers is not the same as blips, blips are below!
  3. {x = -1037.502,y = -2731.55,z = 19.169},
  4. {x = 412.129,y = -964.859,z = 28.473},
  5. {x = -240.911,y = -989.726,z = 28.288},
  6. {x = 1157.023,y = -1519.877,z = 33.843},
  7. {x = -70.826,y = -1114.04,z = 24.862},
  8. }
  9.  
  10. local blips = {
  11. -- Add your wanted blips to your wanted locations here! | Uses table to add more blips so it doesnt cause problems!
  12.  
  13. {title="Scooter gratuit !", colour=2, id=376, x = -1037.502, y = -2731.55, z = 19.169},
  14. {title="Scooter gratuit !", colour=2, id=376, x = 412.129, y = -964.859, z = 28.473},
  15. {title="Scooter gratuit !", colour=2, id=376, x = -240.911, y = -989.726, z = 28.288},
  16. {title="Scooter gratuit !", colour=2, id=376, x = 1157.023, y = -1519.877, z = 33.843},
  17. {title="Scooter gratuit !", colour=2, id=376, x = -70.826, y = -1114.04, z = 24.862},
  18. }
  19. --[[ IMPORTANT READ! IMPORTANT READ! IMPORTANT READ! IMPORTANT READ! IMPORTANT READ! IMPORTANT READ! IMPORTANT READ! IMPORTANT READ! IMPORTANT READ!
  20. Do NOT change or modify the code below if you dont know what you are doing!
  21. Do not complain in the forums if you do so, because i most likely will NOT help you!
  22. ]]
  23.  
  24. Citizen.CreateThread(function()
  25.  
  26. for _, info in pairs(blips) do
  27. info.blip = AddBlipForCoord(info.x, info.y, info.z)
  28. SetBlipSprite(info.blip, info.id)
  29. SetBlipDisplay(info.blip, 4)
  30. SetBlipScale(info.blip, 1.0)
  31. SetBlipColour(info.blip, info.colour)
  32. SetBlipAsShortRange(info.blip, true)
  33. BeginTextCommandSetBlipName("STRING")
  34. AddTextComponentString(info.title)
  35. EndTextCommandSetBlipName(info.blip)
  36. end
  37. end)
  38.  
  39. function hash_bike()
  40. local plyCoords = GetEntityCoords(GetPlayerPed(-1), false)
  41. local hash = GetHashKey("tribike2")
  42. local ve = CreateVehicle(hash,plyCoords, true, false)
  43. local ped = GetPlayerPed()
  44.  
  45. RequestModel(hash)
  46. while not HasModelLoaded(hash) do
  47. RequestModel(hash)
  48. Citizen.Wait(0)
  49. end
  50.  
  51. if ve then
  52. SetPedIntoVehicle(ped, ve, -1)
  53. end
  54. end
  55.  
  56. TaskWarpPedIntoVehicle(GetPlayerPed(), tribike2, -1 )
  57. SetPedIntoVehicle(ped, vehicle, seatIndex)
  58.  
  59. Citizen.CreateThread(function()
  60. while true do
  61. Citizen.Wait(0)
  62. for k in pairs(table) do
  63. -- Draw Marker Here --
  64. DrawMarker(1, table[k].x, table[k].y, table[k].z, 0, 0, 0, 0, 0, 0, 2.001, 2.0001, 0.501, 0, 0, 255, 200, 0, 0, 0, 0)
  65. end
  66. end
  67. end)
  68.  
  69. Citizen.CreateThread(function()
  70. while true do
  71. Citizen.Wait(0)
  72. for k in pairs(table) do
  73. local plyCoords = GetEntityCoords(GetPlayerPed(-1), false)
  74. local dist = Vdist(plyCoords.x, plyCoords.y, plyCoords.z, table[k].x, table[k].y, table[k].z)
  75. if dist <= 1.40 then
  76. AddTextEntry("FREE_BIKE", "Appuyez sur ~r~~h~E~h~~w~ pour récupérer votre scooter !")
  77. DisplayHelpTextThisFrame("FREE_BIKE",false )
  78. if IsControlJustPressed(0,51) and IsPedOnFoot(PlayerPedId()) then
  79. Citizen.Wait(100)
  80. hash_bike()
  81. end
  82.  
  83. end
  84. end
  85. end
  86. end)
  87.  
  88. -- Do not change this!!
  89. print("Bike script is now working! - Scripted by Woopi/Lucas Miller")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement