Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Scripted by Woopi/Lucas Miller
- local table = { -- Here you can add more markers | markers is not the same as blips, blips are below!
- {x = -1037.502,y = -2731.55,z = 19.169},
- {x = 412.129,y = -964.859,z = 28.473},
- {x = -240.911,y = -989.726,z = 28.288},
- {x = 1157.023,y = -1519.877,z = 33.843},
- {x = -70.826,y = -1114.04,z = 24.862},
- }
- local blips = {
- -- Add your wanted blips to your wanted locations here! | Uses table to add more blips so it doesnt cause problems!
- {title="Scooter gratuit !", colour=2, id=376, x = -1037.502, y = -2731.55, z = 19.169},
- {title="Scooter gratuit !", colour=2, id=376, x = 412.129, y = -964.859, z = 28.473},
- {title="Scooter gratuit !", colour=2, id=376, x = -240.911, y = -989.726, z = 28.288},
- {title="Scooter gratuit !", colour=2, id=376, x = 1157.023, y = -1519.877, z = 33.843},
- {title="Scooter gratuit !", colour=2, id=376, x = -70.826, y = -1114.04, z = 24.862},
- }
- --[[ IMPORTANT READ! IMPORTANT READ! IMPORTANT READ! IMPORTANT READ! IMPORTANT READ! IMPORTANT READ! IMPORTANT READ! IMPORTANT READ! IMPORTANT READ!
- Do NOT change or modify the code below if you dont know what you are doing!
- Do not complain in the forums if you do so, because i most likely will NOT help you!
- ]]
- Citizen.CreateThread(function()
- for _, info in pairs(blips) do
- info.blip = AddBlipForCoord(info.x, info.y, info.z)
- SetBlipSprite(info.blip, info.id)
- SetBlipDisplay(info.blip, 4)
- SetBlipScale(info.blip, 1.0)
- SetBlipColour(info.blip, info.colour)
- SetBlipAsShortRange(info.blip, true)
- BeginTextCommandSetBlipName("STRING")
- AddTextComponentString(info.title)
- EndTextCommandSetBlipName(info.blip)
- end
- end)
- function hash_bike()
- local plyCoords = GetEntityCoords(GetPlayerPed(-1), false)
- local hash = GetHashKey("tribike2")
- local ve = CreateVehicle(hash,plyCoords, true, false)
- local ped = GetPlayerPed()
- RequestModel(hash)
- while not HasModelLoaded(hash) do
- RequestModel(hash)
- Citizen.Wait(0)
- end
- if ve then
- SetPedIntoVehicle(ped, ve, -1)
- end
- end
- TaskWarpPedIntoVehicle(GetPlayerPed(), tribike2, -1 )
- SetPedIntoVehicle(ped, vehicle, seatIndex)
- Citizen.CreateThread(function()
- while true do
- Citizen.Wait(0)
- for k in pairs(table) do
- -- Draw Marker Here --
- 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)
- end
- end
- end)
- Citizen.CreateThread(function()
- while true do
- Citizen.Wait(0)
- for k in pairs(table) do
- local plyCoords = GetEntityCoords(GetPlayerPed(-1), false)
- local dist = Vdist(plyCoords.x, plyCoords.y, plyCoords.z, table[k].x, table[k].y, table[k].z)
- if dist <= 1.40 then
- AddTextEntry("FREE_BIKE", "Appuyez sur ~r~~h~E~h~~w~ pour récupérer votre scooter !")
- DisplayHelpTextThisFrame("FREE_BIKE",false )
- if IsControlJustPressed(0,51) and IsPedOnFoot(PlayerPedId()) then
- Citizen.Wait(100)
- hash_bike()
- end
- end
- end
- end
- end)
- -- Do not change this!!
- print("Bike script is now working! - Scripted by Woopi/Lucas Miller")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement