Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 37.05 KB | None | 0 0
  1. maxErrors = 6 -- Change the amount of Errors allowed for the player to pass the driver test, any number above this will result in a failed test
  2.  
  3. local options = {
  4. x = 0.1,
  5. y = 0.2,
  6. width = 0.2,
  7. height = 0.04,
  8. scale = 0.4,
  9. font = 0,
  10. menu_title = "NPC",
  11. menu_subtitle = "Categories",
  12. color_r = 0,
  13. color_g = 128,
  14. color_b = 255,
  15. }
  16.  
  17. local dmvped = {
  18. {type=4, hash=0xc99f21c4, x=239.471, y=-1380.96, z=32.74176, a=3374176},
  19. }
  20.  
  21. local dmvpedpos = {
  22. { ['x'] = 239.471, ['y'] = -1380.96, ['z'] = 33.74176 },
  23. }
  24.  
  25. --[[Locals]]--
  26.  
  27. local dmvschool_location = {232.054, -1389.98, 29.4812}
  28.  
  29. local kmh = 3.6
  30. local VehSpeed = 0
  31.  
  32. local speed_limit_resi = 50.0
  33. local speed_limit_town = 80.0
  34. local speed_limit_freeway = 120
  35. local speed = kmh
  36.  
  37. local DTutOpen = false
  38.  
  39. --[[Events]]--
  40.  
  41. AddEventHandler("playerSpawned", function()
  42. TriggerServerEvent('dmv:LicenseStatus')
  43. end)
  44.  
  45. TestDone = 0
  46.  
  47. RegisterNetEvent('dmv:s')
  48. AddEventHandler('dmv:CheckLicStatus', function()
  49. --Check if player has completed theory test
  50. TestDone = 1
  51. end)
  52.  
  53. --[[Functions]]--
  54.  
  55. function drawNotification(text)
  56. SetNotificationTextEntry("STRING")
  57. AddTextComponentString(text)
  58. DrawNotification(false, false)
  59. end
  60.  
  61. function DrawMissionText2(m_text, showtime)
  62. ClearPrints()
  63. SetTextEntry_2("STRING")
  64. AddTextComponentString(m_text)
  65. DrawSubtitleTimed(showtime, 1)
  66. end
  67.  
  68. function LocalPed()
  69. return GetPlayerPed(-1)
  70. end
  71.  
  72. function GetCar()
  73. return GetVehiclePedIsIn(GetPlayerPed(-1),false)
  74. end
  75.  
  76. function Chat(debugg)
  77. TriggerEvent("chatMessage", '', { 0, 0x99, 255 }, tostring(debugg))
  78. end
  79.  
  80. function drawTxt(text,font,centre,x,y,scale,r,g,b,a)
  81. SetTextFont(font)
  82. SetTextProportional(0)
  83. SetTextScale(scale, scale)
  84. SetTextColour(r, g, b, a)
  85. SetTextDropShadow(0, 0, 0, 0,255)
  86. SetTextEdge(1, 0, 0, 0, 255)
  87. SetTextDropShadow()
  88. SetTextOutline()
  89. SetTextCentre(centre)
  90. SetTextEntry("STRING")
  91. AddTextComponentString(text)
  92. DrawText(x , y)
  93. end
  94.  
  95. --[[Arrays]]--
  96.  
  97. onTestEvent = 0
  98. theorielock = 0
  99. onTtest = 0
  100. testblock = 0
  101. DamageControl = 0
  102. SpeedControl = 0
  103. CruiseControl = 0
  104. Error = 0
  105.  
  106. function startintro()
  107. if TestDone == 0 then
  108. DrawMissionText2("~r~Locked", 5000)
  109. else
  110. DIntro()
  111. end
  112. end
  113.  
  114. function startttest()
  115. --if theorielock == 1 or TestDone == 0 or testblock == 1 then
  116. -- DrawMissionText2("~r~Locked", 5000)
  117. --else
  118. TriggerServerEvent('dmv:ttcharge')
  119. openGui()
  120. Menu.hidden = not Menu.hidden
  121. --end
  122. end
  123.  
  124. function startptest()
  125. --if theorielock == 3 or TestDone == 0 then
  126. if TestDone == 0 then
  127. -- DrawMissionText2("~r~Locked", 5000)
  128. --else
  129. TriggerServerEvent('dmv:dtcharge')
  130. onTestBlipp = AddBlipForCoord(255.13990783691,-1400.7319335938,30.5374584198)
  131. N_0x80ead8e2e1d5d52e(onTestBlipp)
  132. SetBlipRoute(onTestBlipp, 1)
  133. onTestEvent = 1
  134. DamageControl = 1
  135. SpeedControl = 1
  136. onTtest = 3
  137. DTut()
  138. --end
  139. end
  140.  
  141. function EndDTest()
  142. if Error >= maxErrors then
  143. drawNotification("You failed\nYou accumulated ".. Error.." ~r~Error Points")
  144. EndTestTasks()
  145. else
  146. --local licID = 1
  147. -- TriggerServerEvent('ply_prefecture:CheckForLicences', licID) --Uncomment this if youre using ply_prefecture, also make sure your drivers license has 1 as ID
  148. drawNotification("You passed\nYou accumulated ".. Error.." ~r~Error Points")
  149. EndTestTasks()
  150. end
  151. end
  152.  
  153. function EndTestTasks()
  154. onTestBlipp = nil
  155. onTestEvent = 0
  156. DamageControl = 0
  157. Error = 0
  158. TaskLeaveVehicle(GetPlayerPed(-1), veh, 0)
  159. Wait(1000)
  160. CarTargetForLock = GetPlayersLastVehicle(GetPlayerPed(-1))
  161. lockStatus = GetVehicleDoorLockStatus(CarTargetForLock)
  162. SetVehicleDoorsLocked(CarTargetForLock, 2)
  163. SetVehicleDoorsLockedForPlayer(CarTargetForLock, PlayerId(), false)
  164. SetEntityAsMissionEntity(CarTargetForLock, true, true)
  165. Wait(2000)
  166. Citizen.InvokeNative( 0xEA386986E786A54F, Citizen.PointerValueIntInitialized( CarTargetForLock ) )
  167.  
  168.  
  169. end
  170.  
  171.  
  172. function SpawnTestCar()
  173. Citizen.Wait(0)
  174. local myPed = GetPlayerPed(-1)
  175. local player = PlayerId()
  176. local vehicle = GetHashKey('blista')
  177.  
  178. RequestModel(vehicle)
  179.  
  180. while not HasModelLoaded(vehicle) do
  181. Wait(1)
  182. end
  183. colors = table.pack(GetVehicleColours(veh))
  184. extra_colors = table.pack(GetVehicleExtraColours(veh))
  185. plate = math.random(100, 900)
  186. local spawned_car = CreateVehicle(vehicle, 249.40971374512,-1407.2303466797,30.409454345703, true, false)
  187. SetVehicleColours(spawned_car,4,5)
  188. SetVehicleExtraColours(spawned_car,extra_colors[1],extra_colors[2])
  189. SetEntityHeading(spawned_car, 317.64)
  190. SetVehicleOnGroundProperly(spawned_car)
  191. SetPedIntoVehicle(myPed, spawned_car, - 1)
  192. SetModelAsNoLongerNeeded(vehicle)
  193. Citizen.InvokeNative(0xB736A491E64A32CF, Citizen.PointerValueIntInitialized(spawned_car))
  194. CruiseControl = 0
  195. DTutOpen = false
  196. SetEntityVisible(myPed, true)
  197. SetVehicleDoorsLocked(GetCar(), 4)
  198. FreezeEntityPosition(myPed, false)
  199. end
  200.  
  201. function DIntro()
  202. Citizen.Wait(0)
  203. local myPed = GetPlayerPed(-1)
  204. DTutOpen = true
  205. SetEntityCoords(myPed,173.01181030273, -1391.4141845703, 29.408880233765,true, false, false,true)
  206. TriggerEvent("pNotify:SendNotification",{
  207. text = "<b style='color:#1E90FF'>DMV Introduction</b> <br/><br/> La théorie et la pratique sont des éléments importants de l'instruction de conduite.<br/> Cette introduction couvrira les bases et vous assurera que vous êtes préparé avec suffisamment d'informations et de connaissances pour votre test.<br /><br />Les informations tirées de vos leçons théoriques combinées à l'expérience de votre leçon pratique sont essentielles pour négocier les situations et les dilemmes que vous rencontrerez sur la route.<br /><br /> Il est fortement recommandé de faire attention à tous les détails, la plupart de ces questions peuvent exister dans le cadre de votre test de théorie.",
  208. type = "alert",
  209. timeout = (15000),
  210. layout = "center",
  211. queue = "global"
  212. })
  213. Citizen.Wait(16500)
  214. SetEntityCoords(myPed,-428.49026489258, -993.306640625, 46.008815765381,true, false, false,true)
  215. TriggerEvent("pNotify:SendNotification",{
  216. text = "<b style='color:#1E90FF'>Incidents et préoccupations environnementales</b><br /><br /><b style='color:#87CEFA'> Obligation de céder</b><br /> Tous les conducteurs ont le devoir d'obéir aux règles de la route afin d'éviter tout préjudice prévisible pour les autres. Le fait de ne pas céder le droit de passage lorsque la loi l'exige peut entraîner la responsabilité des accidents éventuels.<br /><br /> Lorsque vous entendez une sirène venir, vous devez céder au véhicule d'urgence, simplement tirer vers votre droite.<br /> Vous devez toujours vous arrêter quand un agent de circulation vous le dit.<br /><br /><b style='color:#87CEFA'> Conduite agressive</b><br /> Une voiture qui met en danger ou est ssusceptible de mettre en danger les personnes ou les biens est considérée comme une conduite agressive.<br /> Cependant, une conduite agressive peut entraîner des accidents tragiques. Il est beaucoup plus prudent de conduire à la défensive et de toujours être à l'affût du risque potentiel de collision.<br />",
  217. type = "alert",
  218. timeout = (15000),
  219. layout = "center",
  220. queue = "global"
  221. })
  222. Citizen.Wait(16500)
  223. SetEntityCoords(myPed,-282.55557250977, -282.55557250977, 31.633310317993,true, false, false,true)
  224. TriggerEvent("pNotify:SendNotification",{
  225. text = "<b style='color:#1E90FF'>Zone résidentielle</b> <br /><br/> Maintenir une vitesse appropriée - Jamais plus rapide que la limite affichée, plus lente si le trafic est lourd.<br /><br/> Restez centré dans votre voie. Ne conduisez jamais dans la zone réservée aux voitures garées.<br/><br/> Maintenir une distance de sécurité à suivre - au moins 1 longueur de voiture.<br /><br /> La limite de vitesse dans une zone résidentielle est de 50 km/h.<br />",
  226. type = "alert",
  227. timeout = (15000),
  228. layout = "center",
  229. queue = "global"
  230. })
  231. Citizen.Wait(16500)
  232. SetEntityCoords(myPed,246.35220336914, -1204.3403320313, 43.669715881348,true, false, false,true)
  233. TriggerEvent("pNotify:SendNotification",{
  234. text = "<b style='color:#1E90FF'>Zones/villes aménagées</b> <br/><br/> La limite de 80 km/h s'applique généralement à toute circulation sur toutes les routes avec éclairage public, sauf indication contraire.<br/> Conduire à des vitesses trop rapides pour la route et les conditions de conduite peut être dangereux.<br/><br/> Vous devez toujours réduire votre vitesse lorsque:<br/><br/>&bull; Partager la route avec les piétons <br />&bull; Conduire la nuit, car il est plus difficile de voir d'autres usagers de la route<br />&bull; Conduire la nuit, car il est plus difficile de voir d'autres usagers de la route<br/><br/> Rappelez-vous, les grands véhicules et les motos ont besoin d'une plus grande distance pour arrêter<br />",
  235. type = "alert",
  236. timeout = (15000),
  237. layout = "center",
  238. queue = "global"
  239. })
  240. Citizen.Wait(16500)
  241. SetEntityCoords(myPed,-138.413, -2498.53, 52.2765,true, false, false,true)
  242. TriggerEvent("pNotify:SendNotification",{
  243. text = "<b style='color:#1E90FF'>Autoroutes/autoroutes</b> <br/><br/> Le trafic sur les autoroutes se déplace généralement plus rapidement que sur d'autres routes, donc vous avez moins de temps pour réagir.<br /> Il est particulièrement important d'utiliser vos sences plus tôt et de regarder beaucoup plus loin que vous ne le feriez sur d'autres routes.<br /><br /> Vérifiez le trafic sur l'autoroute et faites correspondre votre vitesse pour entrer en sécurité dans le flux de circulation dans la voie de gauche.<br /><br /> La limite de vitesse dans une zone autoroute/autoroute est de 120 km/h.<br />",
  244. type = "alert",
  245. timeout = (15000),
  246. layout = "center",
  247. queue = "global"
  248. })
  249. Citizen.Wait(16500)
  250. SetEntityCoords(myPed,187.465, -1428.82, 43.9302,true, false, false,true)
  251. TriggerEvent("pNotify:SendNotification",{
  252. text = "<b style='color:#1E90FF'>De l'alcool</b> <br /><br /> Boire pendant la conduite est très dangereux, l'alcool et/ou les drogues nuisent à votre jugement. Un jugement altéré affecte la façon dont vous réagissez aux sons et ce que vous voyez. cependant, Le DMV permet une certaine quantité de concentration d'alcool pour ceux qui conduisent avec un permis de conduire valide.<br /><br /> 0,08% est la limite légale pour la concentration d'alcool dans le sang d'un conducteur<br/>",
  253. type = "alert",
  254. timeout = (15000),
  255. layout = "center",
  256. queue = "global"
  257. })
  258. Citizen.Wait(16500)
  259. SetEntityCoords(myPed,238.756, -1381.65, 32.743,true, false, false,true)
  260. SetEntityVisible(myPed, true)
  261. FreezeEntityPosition(myPed, false)
  262. DTutOpen = false
  263. end
  264.  
  265. function DTut()
  266. Citizen.Wait(0)
  267. local myPed = GetPlayerPed(-1)
  268. DTutOpen = true
  269. SetEntityCoords(myPed,238.70791625977, -1394.7208251953, -1394.7208251953,true, false, false,true)
  270. SetEntityHeading(myPed, 314.39)
  271. TriggerEvent("pNotify:SendNotification",{
  272. text = "<b style='color:#1E90FF'>DMV Instructor:</b> <br /><br /> Nous préparons actuellement votre véhicule pour le test, pendant ce temps, vous devriez lire quelques lignes importantes.<br /><br /><b style='color:#87CEFA'> Limitation de vitesse:</b><br /> - Faites attention au trafic et restez sous le <b style='color:#A52A2A'>speed</b> limite<br /><br /> -À l'heure actuelle, vous devriez connaître les bases, mais nous essaierons de vous rappeler chaque fois que vous<b style='color:#DAA520'>enter/exit</b> Une zone avec une limite de vitesse affichée",
  273. type = "alert",
  274. timeout = (15000),
  275. layout = "center",
  276. queue = "global"
  277. })
  278. Citizen.Wait(16500)
  279. TriggerEvent("pNotify:SendNotification",{
  280. text = "<b style='color:#1E90FF'>DMV Instructor:</b> <br /><br /> Utilisez le<b style='color:#DAA520'> Régulateur de vitesse</b> Caractéristique à éviter <b style='color:#87CEFA'>excès de vitesse</b> Activez-le pendant le test en appuyant sur le bouton<b style='color:#20B2AA'>X</b> Sur votre clavier.<br /><br /><b style='color:#87CEFA'>Evaluation:</b><br /> - Essayez de ne pas écraser le véhicule ou dépassez la limite de vitesse affichée. Vous allez recevoir<b style='color:#A52A2A'>Points d'erreur</b> Chaque fois que vous ne respectez pas ces règles<br /><br /> - Trop <b style='color:#A52A2A'>Points d'erreur</b> Accumulée entraînera un <b style='color:#A52A2A'>Échec</b>",
  281. type = "alert",
  282. timeout = (15000),
  283. layout = "center",
  284. queue = "global"
  285. })
  286. Citizen.Wait(16500)
  287. SpawnTestCar()
  288. DTutOpen = false
  289. end
  290.  
  291. Citizen.CreateThread(function()
  292. while true do
  293. Citizen.Wait(0)
  294. local veh = GetVehiclePedIsUsing(GetPlayerPed(-1))
  295. local ped = GetPlayerPed(-1)
  296. if HasEntityCollidedWithAnything(veh) and DamageControl == 1 then
  297. TriggerEvent("pNotify:SendNotification",{
  298. text = "Le véhicule était<b style='color:#B22222'>Endommagé!</b><br /><br />Regarde ça!",
  299. type = "alert",
  300. timeout = (2000),
  301. layout = "bottomCenter",
  302. queue = "global"
  303. })
  304. Citizen.Wait(1000)
  305. Error = Error + 1
  306. elseif(IsControlJustReleased(1, 23)) and DamageControl == 1 then
  307. drawNotification("Vous ne pouvez pas quitter le véhicule pendant le test")
  308. end
  309.  
  310. if onTestEvent == 1 then
  311. if GetDistanceBetweenCoords(GetEntityCoords(GetPlayerPed(-1)), 255.13990783691,-1400.7319335938,29.5374584198, true) > 4.0001 then
  312. DrawMarker(1,255.13990783691,-1400.7319335938,29.5374584198,0, 0, 0, 0, 0, 0, 1.5, 1.5, 1.5, 178, 236, 93, 155, 0, 0, 2, 0, 0, 0, 0)
  313. else
  314. if onTestBlipp ~= nil and DoesBlipExist(onTestBlipp) then
  315. Citizen.InvokeNative(0x86A652570E5F25DD,Citizen.PointerValueIntInitialized(onTestBlipp))
  316. end
  317. onTestBlipp = AddBlipForCoord(271.8747253418,-1370.5744628906,31.932783126831)
  318. N_0x80ead8e2e1d5d52e(onTestBlipp)
  319. DrawMissionText2("Dirigez-vous vers le prochain point!", 5000)
  320. onTestEvent = 2
  321. end
  322. end
  323.  
  324. if onTestEvent == 2 then
  325. if GetDistanceBetweenCoords(GetEntityCoords(GetPlayerPed(-1)),271.8747253418,-1370.5744628906,30.932783126831, true) > 4.0001 then
  326. DrawMarker(1,271.8747253418,-1370.5744628906,30.932783126831,0, 0, 0, 0, 0, 0, 1.5, 1.5, 1.5, 178, 236, 93, 155, 0, 0, 2, 0, 0, 0, 0)
  327. else
  328. if onTestBlipp ~= nil and DoesBlipExist(onTestBlipp) then
  329. Citizen.InvokeNative(0x86A652570E5F25DD,Citizen.PointerValueIntInitialized(onTestBlipp))
  330. end
  331. onTestBlipp = AddBlipForCoord(234.90780639648,-1345.3854980469, 30.542045593262)
  332. N_0x80ead8e2e1d5d52e(onTestBlipp)
  333. SetBlipRoute(onTestBlipp, 1)
  334. DrawMissionText2("Passez au point suivant!", 5000)
  335. onTestEvent = 3
  336. end
  337. end
  338.  
  339. if onTestEvent == 3 then
  340. if GetDistanceBetweenCoords(GetEntityCoords(GetPlayerPed(-1)),234.90780639648,-1345.3854980469, 29.542045593262, true) > 4.0001 then
  341. DrawMarker(1,234.90780639648,-1345.3854980469, 29.542045593262,0, 0, 0, 0, 0, 0, 1.5, 1.5, 1.5, 178, 236, 93, 155, 0, 0, 2, 0, 0, 0, 0)
  342. else
  343. if onTestBlipp ~= nil and DoesBlipExist(onTestBlipp) then
  344. Citizen.InvokeNative(0x86A652570E5F25DD,Citizen.PointerValueIntInitialized(onTestBlipp))
  345. end
  346. onTestBlipp = AddBlipForCoord(217.82102966309,-1410.5201416016,29.292112350464)
  347. N_0x80ead8e2e1d5d52e(onTestBlipp)
  348. SetBlipRoute(onTestBlipp, 1)
  349. DrawMissionText2("Make a quick ~r~stop~s~ for pedastrian ~y~crossing", 5000)
  350. PlaySound(-1, "RACE_PLACED", "HUD_AWARDS", 0, 0, 1)
  351. FreezeEntityPosition(GetVehiclePedIsUsing(GetPlayerPed(-1)), true) -- Freeze Entity
  352. Citizen.Wait(4000)
  353. FreezeEntityPosition(GetVehiclePedIsUsing(GetPlayerPed(-1)), false) -- Freeze Entity
  354. DrawMissionText2("~g~Great!~s~ lets keep moving!", 5000)
  355. onTestEvent = 4
  356. end
  357. end
  358.  
  359. if onTestEvent == 4 then
  360. if GetDistanceBetweenCoords(GetEntityCoords(GetPlayerPed(-1)),217.82102966309,-1410.5201416016,28.292112350464, true) > 4.0001 then
  361. DrawMarker(1,217.82102966309,-1410.5201416016,28.292112350464,0, 0, 0, 0, 0, 0, 1.5, 1.5, 1.5, 178, 236, 93, 155, 0, 0, 2, 0, 0, 0, 0)
  362. else
  363. if onTestBlipp ~= nil and DoesBlipExist(onTestBlipp) then
  364. Citizen.InvokeNative(0x86A652570E5F25DD,Citizen.PointerValueIntInitialized(onTestBlipp))
  365. end
  366. onTestBlipp = AddBlipForCoord(178.55052185059,-1401.7551269531,28.725154876709)
  367. N_0x80ead8e2e1d5d52e(onTestBlipp)
  368. SetBlipRoute(onTestBlipp, 1)
  369. DrawMissionText2("Do a quick ~r~stop~s~ and watch your ~y~LEFT~s~ before entering traffic", 5000)
  370. PlaySound(-1, "RACE_PLACED", "HUD_AWARDS", 0, 0, 1)
  371. FreezeEntityPosition(GetVehiclePedIsUsing(GetPlayerPed(-1)), true) -- Freeze Entity
  372. Citizen.Wait(6000)
  373. FreezeEntityPosition(GetVehiclePedIsUsing(GetPlayerPed(-1)), false) -- Freeze Entity
  374. DrawMissionText2("~g~Great!~s~ now take a ~y~RIGHT~s~ and pick your lane", 5000)
  375. drawNotification("Area: ~y~Town\n~s~Speed limit: ~y~80 km/h\n~s~Error Points: ~y~".. Error.."/4")
  376. SpeedControl = 2
  377. onTestEvent = 5
  378. Citizen.Wait(4000)
  379. end
  380. end
  381.  
  382. if onTestEvent == 5 then
  383. if GetDistanceBetweenCoords(GetEntityCoords(GetPlayerPed(-1)),178.55052185059,-1401.7551269531,27.725154876709, true) > 4.0001 then
  384. DrawMarker(1,178.55052185059,-1401.7551269531,27.725154876709,0, 0, 0, 0, 0, 0, 1.5, 1.5, 1.5, 178, 236, 93, 155, 0, 0, 2, 0, 0, 0, 0)
  385. else
  386. if onTestBlipp ~= nil and DoesBlipExist(onTestBlipp) then
  387. Citizen.InvokeNative(0x86A652570E5F25DD,Citizen.PointerValueIntInitialized(onTestBlipp))
  388. end
  389. onTestBlipp = AddBlipForCoord(113.16044616699,-1365.2762451172,28.725179672241)
  390. N_0x80ead8e2e1d5d52e(onTestBlipp)
  391. SetBlipRoute(onTestBlipp, 1)
  392. DrawMissionText2("Watch the traffic ~y~lights~s~ !", 5000)
  393. onTestEvent = 6
  394. end
  395. end
  396.  
  397. if onTestEvent == 6 then
  398. if GetDistanceBetweenCoords(GetEntityCoords(GetPlayerPed(-1)),113.16044616699,-1365.2762451172,27.725179672241, true) > 4.0001 then
  399. DrawMarker(1,113.16044616699,-1365.2762451172,27.725179672241,0, 0, 0, 0, 0, 0, 1.5, 1.5, 1.5, 178, 236, 93, 155, 0, 0, 2, 0, 0, 0, 0)
  400. else
  401. if onTestBlipp ~= nil and DoesBlipExist(onTestBlipp) then
  402. Citizen.InvokeNative(0x86A652570E5F25DD,Citizen.PointerValueIntInitialized(onTestBlipp))
  403. end
  404. onTestBlipp = AddBlipForCoord(-73.542953491211,-1364.3355712891,27.789325714111)
  405. N_0x80ead8e2e1d5d52e(onTestBlipp)
  406. SetBlipRoute(onTestBlipp, 1)
  407. onTestEvent = 7
  408. end
  409. end
  410.  
  411.  
  412. if onTestEvent == 7 then
  413. if GetDistanceBetweenCoords(GetEntityCoords(GetPlayerPed(-1)),-73.542953491211,-1364.3355712891,27.789325714111, true) > 4.0001 then
  414. DrawMarker(1,-73.542953491211,-1364.3355712891,27.789325714111,0, 0, 0, 0, 0, 0, 1.5, 1.5, 1.5, 178, 236, 93, 155, 0, 0, 2, 0, 0, 0, 0)
  415. else
  416. if onTestBlipp ~= nil and DoesBlipExist(onTestBlipp) then
  417. Citizen.InvokeNative(0x86A652570E5F25DD,Citizen.PointerValueIntInitialized(onTestBlipp))
  418. end
  419. onTestBlipp = AddBlipForCoord(-355.14373779297,-1420.2822265625,27.868143081665)
  420. N_0x80ead8e2e1d5d52e(onTestBlipp)
  421. SetBlipRoute(onTestBlipp, 1)
  422. DrawMissionText2("Assurez-vous de vous arrêter pour le passage des véhicules!", 5000)
  423. onTestEvent = 8
  424. end
  425. end
  426.  
  427. if onTestEvent == 8 then
  428. if GetDistanceBetweenCoords(GetEntityCoords(GetPlayerPed(-1)),-355.14373779297,-1420.2822265625,27.868143081665, true) > 4.0001 then
  429. DrawMarker(1,-355.14373779297,-1420.2822265625,27.868143081665,0, 0, 0, 0, 0, 0, 1.5, 1.5, 1.5, 178, 236, 93, 155, 0, 0, 2, 0, 0, 0, 0)
  430. else
  431. if onTestBlipp ~= nil and DoesBlipExist(onTestBlipp) then
  432. Citizen.InvokeNative(0x86A652570E5F25DD,Citizen.PointerValueIntInitialized(onTestBlipp))
  433. end
  434. onTestBlipp = AddBlipForCoord(-439.14846801758,-1417.1004638672,27.704095840454)
  435. N_0x80ead8e2e1d5d52e(onTestBlipp)
  436. SetBlipRoute(onTestBlipp, 1)
  437. onTestEvent = 9
  438. end
  439. end
  440.  
  441. if onTestEvent == 9 then
  442. if GetDistanceBetweenCoords(GetEntityCoords(GetPlayerPed(-1)),-439.14846801758,-1417.1004638672,27.704095840454, true) > 4.0001 then
  443. DrawMarker(1,-439.14846801758,-1417.1004638672,27.704095840454,0, 0, 0, 0, 0, 0, 1.5, 1.5, 1.5, 178, 236, 93, 155, 0, 0, 2, 0, 0, 0, 0)
  444. else
  445. if onTestBlipp ~= nil and DoesBlipExist(onTestBlipp) then
  446. Citizen.InvokeNative(0x86A652570E5F25DD,Citizen.PointerValueIntInitialized(onTestBlipp))
  447. end
  448. onTestBlipp = AddBlipForCoord(-453.79092407227,-1444.7265625,27.665870666504)
  449. N_0x80ead8e2e1d5d52e(onTestBlipp)
  450. SetBlipRoute(onTestBlipp, 1)
  451. onTestEvent = 10
  452. end
  453. end
  454.  
  455. if onTestEvent == 10 then
  456. if GetDistanceBetweenCoords(GetEntityCoords(GetPlayerPed(-1)),-453.79092407227,-1444.7265625,27.665870666504, true) > 4.0001 then
  457. DrawMarker(1,-453.79092407227,-1444.7265625,27.665870666504,0, 0, 0, 0, 0, 0, 1.5, 1.5, 1.5, 178, 236, 93, 155, 0, 0, 2, 0, 0, 0, 0)
  458. else
  459. if onTestBlipp ~= nil and DoesBlipExist(onTestBlipp) then
  460. Citizen.InvokeNative(0x86A652570E5F25DD,Citizen.PointerValueIntInitialized(onTestBlipp))
  461. end
  462. onTestBlipp = AddBlipForCoord(-463.23712158203,-1592.1785888672,37.519771575928)
  463. N_0x80ead8e2e1d5d52e(onTestBlipp)
  464. SetBlipRoute(onTestBlipp, 1)
  465. DrawMissionText2("Il est temps de frapper la route, de regarder votre vitesse et de ne pas tomber!", 5000)
  466. PlaySound(-1, "RACE_PLACED", "HUD_AWARDS", 0, 0, 1)
  467. drawNotification("Area: ~y~Freeway\n~s~Speed limit: ~y~120 km/h\n~s~Error Points: ~y~".. Error.."/4")
  468. onTestEvent = 11
  469. SpeedControl = 3
  470. Citizen.Wait(4000)
  471. end
  472. end
  473.  
  474. if onTestEvent == 11 then
  475. if GetDistanceBetweenCoords(GetEntityCoords(GetPlayerPed(-1)),-463.23712158203,-1592.1785888672,37.519771575928, true) > 4.0001 then
  476. DrawMarker(1,-463.23712158203,-1592.1785888672,37.519771575928,0, 0, 0, 0, 0, 0, 1.5, 1.5, 1.5, 178, 236, 93, 155, 0, 0, 2, 0, 0, 0, 0)
  477. else
  478. if onTestBlipp ~= nil and DoesBlipExist(onTestBlipp) then
  479. Citizen.InvokeNative(0x86A652570E5F25DD,Citizen.PointerValueIntInitialized(onTestBlipp))
  480. end
  481. onTestBlipp = AddBlipForCoord(-900.64721679688,-1986.2814941406,26.109502792358)
  482. N_0x80ead8e2e1d5d52e(onTestBlipp)
  483. SetBlipRoute(onTestBlipp, 1)
  484. onTestEvent = 12
  485. end
  486. end
  487.  
  488. if onTestEvent == 12 then
  489. if GetDistanceBetweenCoords(GetEntityCoords(GetPlayerPed(-1)),-900.64721679688,-1986.2814941406,26.109502792358, true) > 4.0001 then
  490. DrawMarker(1,-900.64721679688,-1986.2814941406,26.109502792358,0, 0, 0, 0, 0, 0, 1.5, 1.5, 1.5, 178, 236, 93, 155, 0, 0, 2, 0, 0, 0, 0)
  491. else
  492. if onTestBlipp ~= nil and DoesBlipExist(onTestBlipp) then
  493. Citizen.InvokeNative(0x86A652570E5F25DD,Citizen.PointerValueIntInitialized(onTestBlipp))
  494. end
  495. onTestBlipp = AddBlipForCoord(1225.7598876953,-1948.7922363281,38.718940734863)
  496. N_0x80ead8e2e1d5d52e(onTestBlipp)
  497. SetBlipRoute(onTestBlipp, 1)
  498. onTestEvent = 13
  499. end
  500. end
  501.  
  502. if onTestEvent == 13 then
  503. if GetDistanceBetweenCoords(GetEntityCoords(GetPlayerPed(-1)),1225.7598876953,-1948.7922363281,38.718940734863, true) > 4.0001 then
  504. DrawMarker(1,1225.7598876953,-1948.7922363281,38.718940734863,0, 0, 0, 0, 0, 0, 1.5, 1.5, 1.5, 178, 236, 93, 155, 0, 0, 2, 0, 0, 0, 0)
  505. else
  506. if onTestBlipp ~= nil and DoesBlipExist(onTestBlipp) then
  507. Citizen.InvokeNative(0x86A652570E5F25DD,Citizen.PointerValueIntInitialized(onTestBlipp))
  508. end
  509. onTestBlipp = AddBlipForCoord(209.54621887207,-1412.8677978516,29.652387619019)
  510. N_0x80ead8e2e1d5d52e(onTestBlipp)
  511. SetBlipRoute(onTestBlipp, 1)
  512. onTestEvent = 14
  513. end
  514. end
  515.  
  516. if onTestEvent == 14 then
  517. if GetDistanceBetweenCoords(GetEntityCoords(GetPlayerPed(-1)),1225.7598876953,-1948.7922363281,38.718940734863, true) > 4.0001 then
  518. DrawMarker(1,1225.7598876953,-1948.7922363281,38.718940734863,0, 0, 0, 0, 0, 0, 1.5, 1.5, 1.5, 178, 236, 93, 155, 0, 0, 2, 0, 0, 0, 0)
  519. else
  520. if onTestBlipp ~= nil and DoesBlipExist(onTestBlipp) then
  521. Citizen.InvokeNative(0x86A652570E5F25DD,Citizen.PointerValueIntInitialized(onTestBlipp))
  522. end
  523. onTestBlipp = AddBlipForCoord(1163.6030273438,-1841.7713623047,35.679168701172)
  524. N_0x80ead8e2e1d5d52e(onTestBlipp)
  525. SetBlipRoute(onTestBlipp, 1)
  526. DrawMissionText2("Entering town, watch your speed!", 5000)
  527. drawNotification("~r~Slow down!\n~s~Area: ~y~Town\n~s~Speed limit: ~y~80 km/h\n~s~Error Points: ~y~".. Error.."/4")
  528. onTestEvent = 15
  529. end
  530. end
  531.  
  532. if onTestEvent == 15 then
  533. if GetDistanceBetweenCoords(GetEntityCoords(GetPlayerPed(-1)),1163.6030273438,-1841.7713623047,35.679168701172, true) > 4.0001 then
  534. DrawMarker(1,1163.6030273438,-1841.7713623047,35.679168701172,0, 0, 0, 0, 0, 0, 1.5, 1.5, 1.5, 178, 236, 93, 155, 0, 0, 2, 0, 0, 0, 0)
  535. else
  536. if onTestBlipp ~= nil and DoesBlipExist(onTestBlipp) then
  537. Citizen.InvokeNative(0x86A652570E5F25DD,Citizen.PointerValueIntInitialized(onTestBlipp))
  538. end
  539. onTestBlipp = AddBlipForCoord(235.28327941895,-1398.3292236328,28.921098709106)
  540. N_0x80ead8e2e1d5d52e(onTestBlipp)
  541. SetBlipRoute(onTestBlipp, 1)
  542. PlaySound(-1, "RACE_PLACED", "HUD_AWARDS", 0, 0, 1)
  543. DrawMissionText2("Good job, now lets head back!", 5000)
  544. drawNotification("Area: ~y~Town\n~s~Speed limit: ~y~80 km/h\n~s~Error Points: ~y~".. Error.."/4")
  545. SpeedControl = 2
  546. onTestEvent = 16
  547. end
  548. end
  549.  
  550. if onTestEvent == 16 then
  551. if GetDistanceBetweenCoords(GetEntityCoords(GetPlayerPed(-1)),235.28327941895,-1398.3292236328,28.921098709106, true) > 4.0001 then
  552. DrawMarker(1,235.28327941895,-1398.3292236328,28.921098709106,0, 0, 0, 0, 0, 0, 1.5, 1.5, 1.5, 178, 236, 93, 155, 0, 0, 2, 0, 0, 0, 0)
  553. else
  554. if onTestBlipp ~= nil and DoesBlipExist(onTestBlipp) then
  555. Citizen.InvokeNative(0x86A652570E5F25DD,Citizen.PointerValueIntInitialized(onTestBlipp))
  556. end
  557. EndDTest()
  558. end
  559. end
  560. end
  561. end)
  562.  
  563. ----Theory Test NUI Operator
  564.  
  565. -- ***************** Open Gui and Focus NUI
  566. function openGui()
  567. onTtest = 1
  568. SetNuiFocus(true)
  569. SendNUIMessage({openQuestion = true})
  570. end
  571.  
  572. -- ***************** Close Gui and disable NUI
  573. function closeGui()
  574. SetNuiFocus(false)
  575. SendNUIMessage({openQuestion = false})
  576. end
  577.  
  578. -- ***************** Disable controls while GUI open
  579. Citizen.CreateThread(function()
  580. while true do
  581. if onTtest == 1 then
  582. local ply = GetPlayerPed(-1)
  583. local active = true
  584. DisableControlAction(0, 1, active) -- LookLeftRight
  585. DisableControlAction(0, 2, active) -- LookUpDown
  586. DisablePlayerFiring(ply, true) -- Disable weapon firing
  587. DisableControlAction(0, 142, active) -- MeleeAttackAlternate
  588. DisableControlAction(0, 106, active) -- VehicleMouseControlOverride
  589. if IsDisabledControlJustReleased(0, 142) then -- MeleeAttackAlternate
  590. SendNUIMessage({type = "click"})
  591. end
  592. end
  593. Citizen.Wait(0)
  594. end
  595. end)
  596.  
  597. -- ***************** NUI Callback Methods
  598. -- Callbacks pages opening
  599. RegisterNUICallback('question', function(data, cb)
  600. SendNUIMessage({openSection = "question"})
  601. cb('ok')
  602. end)
  603.  
  604. -- Callback actions triggering server events
  605. RegisterNUICallback('close', function(data, cb)
  606. -- if question success
  607. closeGui()
  608. cb('ok')
  609. TriggerServerEvent('dmv:success')
  610. DrawMissionText2("~b~Le test est passé, vous pouvez maintenant passer au test de conduite", 2000)
  611. TestDone = 0
  612. theorielock = 0
  613. onTtest = 3
  614. end)
  615.  
  616. RegisterNUICallback('kick', function(data, cb)
  617. closeGui()
  618. cb('ok')
  619. DrawMissionText2("~r~Vous avez échoué au test, vous pourriez essayer encore un autre jour", 2000)
  620. onTtest = 0
  621. theorielock = 3
  622. testblock = 1
  623. end)
  624.  
  625. Citizen.CreateThread(function()
  626. while true do
  627. Citizen.Wait(1)
  628. if(IsPedInAnyVehicle(GetPlayerPed(-1), false)) and TestDone == 1 and onTtest == 0 then
  629. DrawMissionText2("~r~Vous conduisez sans permis", 2000)
  630. end
  631. end
  632. end)
  633.  
  634. Citizen.CreateThread(function()
  635. while true do
  636. Citizen.Wait(1)
  637. CarSpeed = GetEntitySpeed(GetCar()) * speed
  638. if(IsPedInAnyVehicle(GetPlayerPed(-1), false)) and SpeedControl == 1 and CarSpeed >= speed_limit_resi then
  639. TriggerEvent("pNotify:SendNotification",{
  640. text = "You are speeding! <b style='color:#B22222'>Slow down!</b><br /><br />You are driving in a <b style='color:#DAA520'>50 km/h</b> zone!",
  641. type = "alert",
  642. timeout = (2000),
  643. layout = "bottomCenter",
  644. queue = "global"
  645. })
  646. Error = Error + 1
  647. Citizen.Wait(10000)
  648. elseif(IsPedInAnyVehicle(GetPlayerPed(-1), false)) and SpeedControl == 2 and CarSpeed >= speed_limit_town then
  649. TriggerEvent("pNotify:SendNotification",{
  650. text = "You are speeding! <b style='color:#B22222'>Slow down!</b><br /><br />You are driving in a <b style='color:#DAA520'>80 km/h</b> zone!",
  651. type = "alert",
  652. timeout = (2000),
  653. layout = "bottomCenter",
  654. queue = "global"
  655. })
  656. Error = Error + 1
  657. Citizen.Wait(10000)
  658. elseif(IsPedInAnyVehicle(GetPlayerPed(-1), false)) and SpeedControl == 3 and CarSpeed >= speed_limit_freeway then
  659. TriggerEvent("pNotify:SendNotification",{
  660. text = "You are speeding! <b style='color:#B22222'>Slow down!</b><br /><br />You are driving in a <b style='color:#DAA520'>120 km/h</b> zone!",
  661. type = "alert",
  662. timeout = (2000),
  663. layout = "bottomCenter",
  664. queue = "global"
  665. })
  666. Error = Error + 1
  667. Citizen.Wait(10000)
  668. end
  669. end
  670. end)
  671.  
  672.  
  673. local speedLimit = 0
  674. Citizen.CreateThread( function()
  675. while true do
  676. Citizen.Wait( 0 )
  677. local ped = GetPlayerPed(-1)
  678. local vehicle = GetVehiclePedIsIn(ped, false)
  679. local vehicleModel = GetEntityModel(vehicle)
  680. local speed = GetEntitySpeed(vehicle)
  681. local inVehicle = IsPedSittingInAnyVehicle(ped)
  682. local float Max = GetVehicleMaxSpeed(vehicleModel)
  683. if ( ped and inVehicle and DamageControl == 1 ) then
  684. if IsControlJustPressed(1, 73) then
  685. if (GetPedInVehicleSeat(vehicle, -1) == ped) then
  686. if CruiseControl == 0 then
  687. speedLimit = speed
  688. SetEntityMaxSpeed(vehicle, speedLimit)
  689. drawNotification("~y~Cruise Control: ~g~enabled\n~s~MAX speed ".. math.floor(speedLimit*3.6).."kmh")
  690. Citizen.Wait(1000)
  691. DisplayHelpText("Adjust your max speed with ~INPUT_CELLPHONE_UP~ ~INPUT_CELLPHONE_DOWN~ controls")
  692. PlaySound(-1, "COLLECTED", "HUD_AWARDS", 0, 0, 1)
  693. CruiseControl = 1
  694. else
  695. SetEntityMaxSpeed(vehicle, Max)
  696. drawNotification("~y~Cruise Control: ~r~disabled")
  697. CruiseControl = 0
  698. end
  699. else
  700. drawNotification("Vous devez conduire pour préformer cette action")
  701. end
  702. elseif IsControlJustPressed(1, 27) then
  703. if CruiseControl == 1 then
  704. speedLimit = speedLimit + 0.45
  705. SetEntityMaxSpeed(vehicle, speedLimit)
  706. PlaySound(-1, "NAV_UP_DOWN", "HUD_FRONTEND_DEFAULT_SOUNDSET", 0, 0, 1)
  707. DisplayHelpText("Max speed adjusted to ".. math.floor(speedLimit*3.6).. "kmh")
  708. end
  709. elseif IsControlJustPressed(1, 173) then
  710. if CruiseControl == 1 then
  711. speedLimit = speedLimit - 0.45
  712. SetEntityMaxSpeed(vehicle, speedLimit)
  713. PlaySound(-1, "NAV_UP_DOWN", "HUD_FRONTEND_DEFAULT_SOUNDSET", 0, 0, 1)
  714. DisplayHelpText("Max speed adjusted to ".. math.floor(speedLimit*3.6).. "kmh")
  715. end
  716. end
  717. end
  718. end
  719. end)
  720.  
  721. ----Theory Test NUI Operator
  722.  
  723. -- ***************** Open Gui and Focus NUI
  724. function openGui()
  725. onTtest = 1
  726. SetNuiFocus(true)
  727. SendNUIMessage({openQuestion = true})
  728. end
  729.  
  730. -- ***************** Close Gui and disable NUI
  731. function closeGui()
  732. SetNuiFocus(false)
  733. SendNUIMessage({openQuestion = false})
  734. end
  735.  
  736. -- ***************** Disable controls while GUI open
  737. Citizen.CreateThread(function()
  738. while true do
  739. if onTtest == 1 then
  740. local ply = GetPlayerPed(-1)
  741. local active = true
  742. DisableControlAction(0, 1, active) -- LookLeftRight
  743. DisableControlAction(0, 2, active) -- LookUpDown
  744. DisablePlayerFiring(ply, true) -- Disable weapon firing
  745. DisableControlAction(0, 142, active) -- MeleeAttackAlternate
  746. DisableControlAction(0, 106, active) -- VehicleMouseControlOverride
  747. if IsDisabledControlJustReleased(0, 142) then -- MeleeAttackAlternate
  748. SendNUIMessage({type = "click"})
  749. end
  750. end
  751. Citizen.Wait(0)
  752. end
  753. end)
  754.  
  755. Citizen.CreateThread(function()
  756. while true do
  757. if DTutOpen then
  758. local ply = GetPlayerPed(-1)
  759. local active = true
  760. SetEntityVisible(ply, false)
  761. FreezeEntityPosition(ply, true)
  762. DisableControlAction(0, 1, active) -- LookLeftRight
  763. DisableControlAction(0, 2, active) -- LookUpDown
  764. DisablePlayerFiring(ply, true) -- Disable weapon firing
  765. DisableControlAction(0, 142, active) -- MeleeAttackAlternate
  766. DisableControlAction(0, 106, active) -- VehicleMouseControlOverride
  767. end
  768. Citizen.Wait(0)
  769. end
  770. end)
  771.  
  772. -- ***************** NUI Callback Methods
  773. -- Callbacks pages opening
  774. RegisterNUICallback('question', function(data, cb)
  775. SendNUIMessage({openSection = "question"})
  776. cb('ok')
  777. end)
  778.  
  779. -- Callback actions triggering server events
  780. RegisterNUICallback('close', function(data, cb)
  781. -- if question success
  782. closeGui()
  783. cb('ok')
  784. TriggerServerEvent('dmv:success')
  785. DrawMissionText2("~b~Le test est passé, vous pouvez maintenant passer au test de conduite", 2000)
  786. TestDone = 0
  787. theorielock = 0
  788. onTtest = 3
  789. end)
  790.  
  791. RegisterNUICallback('kick', function(data, cb)
  792. closeGui()
  793. cb('ok')
  794. DrawMissionText2("~r~Vous avez échoué au test, vous pourriez essayer encore un autre jour", 2000)
  795. onTtest = 0
  796. theorielock = 3
  797. testblock = 1
  798. end)
  799.  
  800. ---------------------------------- DMV PED ----------------------------------
  801.  
  802. Citizen.CreateThread(function()
  803.  
  804. RequestModel(GetHashKey("a_m_y_business_01"))
  805. while not HasModelLoaded(GetHashKey("a_m_y_business_01")) do
  806. Wait(1)
  807. end
  808.  
  809. RequestAnimDict("mini@strip_club@idles@bouncer@base")
  810. while not HasAnimDictLoaded("mini@strip_club@idles@bouncer@base") do
  811. Wait(1)
  812. end
  813.  
  814. -- Spawn the DMV Ped
  815. for _, item in pairs(dmvped) do
  816. dmvmainped = CreatePed(item.type, item.hash, item.x, item.y, item.z, item.a, false, true)
  817. SetEntityHeading(dmvmainped, 137.71)
  818. FreezeEntityPosition(dmvmainped, true)
  819. SetEntityInvincible(dmvmainped, true)
  820. SetBlockingOfNonTemporaryEvents(dmvmainped, true)
  821. TaskPlayAnim(dmvmainped,"mini@strip_club@idles@bouncer@base","base", 8.0, 0.0, -1, 1, 0, 0, 0, 0)
  822. end
  823. end)
  824.  
  825. local talktodmvped = true
  826. --DMV Ped interaction
  827. Citizen.CreateThread(function()
  828. while true do
  829. Citizen.Wait(0)
  830. local pos = GetEntityCoords(GetPlayerPed(-1), false)
  831. for k,v in ipairs(dmvpedpos) do
  832. if(Vdist(v.x, v.y, v.z, pos.x, pos.y, pos.z) < 1.0)then
  833. DisplayHelpText("Press ~INPUT_CONTEXT~ to interact with ~y~NPC")
  834. if(IsControlJustReleased(1, 38))then
  835. if talktodmvped then
  836. Notify("~b~Bienvenue à la ~h~École DMV!")
  837. Citizen.Wait(500)
  838. DMVMenu()
  839. Menu.hidden = false
  840. talktodmvped = false
  841. else
  842. talktodmvped = true
  843. end
  844. end
  845. Menu.renderGUI(options)
  846. end
  847. end
  848. end
  849. end)
  850.  
  851. ------------
  852. ------------ DRAW MENUS
  853. ------------
  854. function DMVMenu()
  855. ClearMenu()
  856. options.menu_title = "DMV School"
  857. Menu.addButton("Obtain a drivers license","VehLicenseMenu",nil)
  858. Menu.addButton("Close","CloseMenu",nil)
  859. end
  860.  
  861. function VehLicenseMenu()
  862. ClearMenu()
  863. options.menu_title = "Vehicle License"
  864. Menu.addButton("Introduction FREE","startintro",nil)
  865. Menu.addButton("Theory test 200$","startttest",nil)
  866. Menu.addButton("Practical test 500$","startptest",nil)
  867. Menu.addButton("Return","DMVMenu",nil)
  868. end
  869.  
  870. function CloseMenu()
  871. Menu.hidden = true
  872. end
  873.  
  874. function Notify(text)
  875. SetNotificationTextEntry('STRING')
  876. AddTextComponentString(text)
  877. DrawNotification(false, false)
  878. end
  879.  
  880. function drawNotification(text)
  881. SetNotificationTextEntry("STRING")
  882. AddTextComponentString(text)
  883. DrawNotification(true, true)
  884. end
  885.  
  886. function DisplayHelpText(str)
  887. SetTextComponentFormat("STRING")
  888. AddTextComponentString(str)
  889. DisplayHelpTextFromStringLabel(0, 0, 1, -1)
  890. end
  891.  
  892. ----------------
  893. ----------------blip
  894. ----------------
  895.  
  896.  
  897.  
  898. Citizen.CreateThread(function()
  899. pos = dmvschool_location
  900. local blip = AddBlipForCoord(pos[1],pos[2],pos[3])
  901. SetBlipSprite(blip,408)
  902. SetBlipColour(blip,11)
  903. BeginTextCommandSetBlipName("STRING")
  904. AddTextComponentString('Auto Ecole')
  905. EndTextCommandSetBlipName(blip)
  906. SetBlipAsShortRange(blip,true)
  907. SetBlipAsMissionCreatorBlip(blip,true)
  908. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement