SHOW:
|
|
- or go back to the newest paste.
1 | function drawTxt(x,y ,width,height,scale, text, r,g,b,a) | |
2 | SetTextFont(0) | |
3 | SetTextProportional(0) | |
4 | SetTextScale(scale, scale) | |
5 | SetTextColour(r, g, b, a) | |
6 | SetTextDropShadow(0, 0, 0, 0,255) | |
7 | SetTextEdge(1, 0, 0, 0, 255) | |
8 | SetTextDropShadow() | |
9 | SetTextOutline() | |
10 | SetTextEntry("STRING") | |
11 | AddTextComponentString(text) | |
12 | DrawText(x - width/2, y - height/2 + 0.005) | |
13 | end | |
14 | ||
15 | local zones = { ['AIRP'] = "Los Santos International Airport", ['ALAMO'] = "Alamo Sea", ['ALTA'] = "Alta", ['ARMYB'] = "Fort Zancudo", ['BANHAMC'] = "Banham Canyon Dr", ['BANNING'] = "Banning", ['BEACH'] = "Vespucci Beach", ['BHAMCA'] = "Banham Canyon", ['BRADP'] = "Braddock Pass", ['BRADT'] = "Braddock Tunnel", ['BURTON'] = "Burton", ['CALAFB'] = "Calafia Bridge", ['CANNY'] = "Raton Canyon", ['CCREAK'] = "Cassidy Creek", ['CHAMH'] = "Chamberlain Hills", ['CHIL'] = "Vinewood Hills", ['CHU'] = "Chumash", ['CMSW'] = "Chiliad Mountain State Wilderness", ['CYPRE'] = "Cypress Flats", ['DAVIS'] = "Davis", ['DELBE'] = "Del Perro Beach", ['DELPE'] = "Del Perro", ['DELSOL'] = "La Puerta", ['DESRT'] = "Grand Senora Desert", ['DOWNT'] = "Downtown", ['DTVINE'] = "Downtown Vinewood", ['EAST_V'] = "East Vinewood", ['EBURO'] = "El Burro Heights", ['ELGORL'] = "El Gordo Lighthouse", ['ELYSIAN'] = "Elysian Island", ['GALFISH'] = "Galilee", ['GOLF'] = "GWC and Golfing Society", ['GRAPES'] = "Grapeseed", ['GREATC'] = "Great Chaparral", ['HARMO'] = "Harmony", ['HAWICK'] = "Hawick", ['HORS'] = "Vinewood Racetrack", ['HUMLAB'] = "Humane Labs and Research", ['JAIL'] = "Bolingbroke Penitentiary", ['KOREAT'] = "Little Seoul", ['LACT'] = "Land Act Reservoir", ['LAGO'] = "Lago Zancudo", ['LDAM'] = "Land Act Dam", ['LEGSQU'] = "Legion Square", ['LMESA'] = "La Mesa", ['LOSPUER'] = "La Puerta", ['MIRR'] = "Mirror Park", ['MORN'] = "Morningwood", ['MOVIE'] = "Richards Majestic", ['MTCHIL'] = "Mount Chiliad", ['MTGORDO'] = "Mount Gordo", ['MTJOSE'] = "Mount Josiah", ['MURRI'] = "Murrieta Heights", ['NCHU'] = "North Chumash", ['NOOSE'] = "N.O.O.S.E", ['OCEANA'] = "Pacific Ocean", ['PALCOV'] = "Paleto Cove", ['PALETO'] = "Paleto Bay", ['PALFOR'] = "Paleto Forest", ['PALHIGH'] = "Palomino Highlands", ['PALMPOW'] = "Palmer-Taylor Power Station", ['PBLUFF'] = "Pacific Bluffs", ['PBOX'] = "Pillbox Hill", ['PROCOB'] = "Procopio Beach", ['RANCHO'] = "Rancho", ['RGLEN'] = "Richman Glen", ['RICHM'] = "Richman", ['ROCKF'] = "Rockford Hills", ['RTRAK'] = "Redwood Lights Track", ['SANAND'] = "San Andreas", ['SANCHIA'] = "San Chianski Mountain Range", ['SANDY'] = "Sandy Shores", ['SKID'] = "Mission Row", ['SLAB'] = "Stab City", ['STAD'] = "Maze Bank Arena", ['STRAW'] = "Strawberry", ['TATAMO'] = "Tataviam Mountains", ['TERMINA'] = "Terminal", ['TEXTI'] = "Textile City", ['TONGVAH'] = "Tongva Hills", ['TONGVAV'] = "Tongva Valley", ['VCANA'] = "Vespucci Canals", ['VESP'] = "Vespucci", ['VINE'] = "Vinewood", ['WINDF'] = "Ron Alternates Wind Farm", ['WVINE'] = "West Vinewood", ['ZANCUDO'] = "Zancudo River", ['ZP_ORT'] = "Port of South Los Santos", ['ZQ_UAR'] = "Davis Quartz" } | |
16 | ||
17 | local directions = { [0] = 'N', [45] = 'NW', [90] = 'W', [135] = 'SW', [180] = 'S', [225] = 'SE', [270] = 'E', [315] = 'NE', [360] = 'N', } | |
18 | ||
19 | Citizen.CreateThread(function() | |
20 | while true do | |
21 | Citizen.Wait(1) | |
22 | ||
23 | local var1, var2 = GetStreetNameAtCoord(pos.x, pos.y, pos.z, Citizen.ResultAsInteger(), Citizen.ResultAsInteger()) | |
24 | local c_veh = GetVehiclePedIsIn(GetPlayerPed(-1),false) | |
25 | local plate_veh = GetVehicleNumberPlateText(c_veh) | |
26 | local lock_sts = GetVehicleDoorLockStatus(c_veh) -- Lock Status | |
27 | ||
28 | - | pos = GetEntityCoords(GetPlayerPed(-1)) |
28 | + | |
29 | ||
30 | - | -- poszero = table.uupack(GetEntityCoords(GetPlayerPed(-1))) |
30 | + | |
31 | pos = GetEntityCoords(GetPlayerPed(-1)) --------------------------------------POS------------ | |
32 | ||
33 | if IsCopVehicleInArea3d(pos.["x"] - 50, pos.["y"] - 50, pos.["z"] - 50, pos.["x"] + 50, pos.["y"] + 50, pos.["z"] + 50) then | |
34 | --drawTxt(1.2, 1.2, 1.0,1.0,0.31,'Test 1 2 3 4 5 6 7 8 9', 255, 255, 225, 255) | |
35 | end | |
36 | ||
37 | ||
38 | ||
39 | ||
40 | ||
41 | ||
42 | ||
43 | for k,v in pairs(directions)do | |
44 | direction = GetEntityHeading(GetPlayerPed()) | |
45 | if(math.abs(direction - k) < 22.5)then | |
46 | direction = v | |
47 | break; | |
48 | end | |
49 | end | |
50 | ||
51 | if(var2 ~= 0)then | |
52 | drawTxt(0.675, 1.42, 1.0,1.0,0.4, "~w~[~y~" .. tostring(GetStreetNameFromHashKey(var2)) .. "~w~]", 255, 255, 255, 255) | |
53 | end | |
54 | ||
55 | if(GetStreetNameFromHashKey(var1) and GetNameOfZone(pos.x, pos.y, pos.z))then | |
56 | if(zones[GetNameOfZone(pos.x, pos.y, pos.z)] and tostring(GetStreetNameFromHashKey(var1)))then | |
57 | drawTxt(0.675, 1.45, 1.0,1.0,0.4, direction .. "~b~ | ~y~" .. tostring(GetStreetNameFromHashKey(var1)) .. " ~w~/ ~y~" .. zones[GetNameOfZone(pos.x, pos.y, pos.z)], 255, 255, 255, 255) | |
58 | end | |
59 | end | |
60 | ||
61 | local t = 0 | |
62 | for i = 0,32 do | |
63 | if(GetPlayerName(i))then | |
64 | if(NetworkIsPlayerTalking(i))then | |
65 | t = t + 1 | |
66 | ||
67 | if(t == 1)then | |
68 | drawTxt(0.515, 0.95, 1.0,1.0,0.4, "~y~Vorbeste", 255, 255, 255, 255) | |
69 | end | |
70 | ||
71 | drawTxt(0.520, 0.95 + (t * 0.023), 1.0,1.0,0.4, "" .. GetPlayerName(i), 255, 255, 255, 255) | |
72 | end | |
73 | end | |
74 | end | |
75 | ||
76 | if(IsPedInAnyVehicle(GetPlayerPed(-1), false))then | |
77 | local speed = GetEntitySpeed(GetVehiclePedIsIn(GetPlayerPed(-1), false)) * 3.6 | |
78 | ||
79 | drawTxt(1.407, 1.30, 1.0,1.0,0.7, "~y~" .. math.ceil(speed) .. "", 255, 255, 255, 255) | |
80 | drawTxt(1.4, 1.337, 1.0,1.0,0.7, "~b~ km/h", 255, 255, 255, 255) | |
81 | drawTxt(1.4068, 1.38, 1.0,1.0,0.31,"~b~ Numar: " .. plate_veh, 255, 255, 225, 255) | |
82 | -- 1.4068 | |
83 | if (GetVehicleEngineHealth(c_veh) > 400) and (GetVehicleEngineHealth(c_veh) <= 1000) then | |
84 | drawTxt(1.4068, 1.4, 1.0,1.0,0.31,"~b~ Avarii: " .. "~g~~h~ [] [] []", 255, 255, 225, 255) | |
85 | --drawTxt(1.438, 1.404, 1.0,1.0,0.31,"~g~~h~ * * * ", 255, 255, 225, 255) | |
86 | elseif (GetVehicleEngineHealth(c_veh) >= 10 ) and (GetVehicleEngineHealth(c_veh) < 400) then | |
87 | drawTxt(1.4068, 1.4, 1.0,1.0,0.31,"~b~ Avarii: " .. "~y~~h~ [] []", 255, 255, 225, 255) | |
88 | elseif GetVehicleEngineHealth(c_veh) == 0 then | |
89 | drawTxt(1.4068, 1.4, 1.0,1.0,0.31,"~b~ Avarii: " .. "~r~~h~ []", 255, 255, 225, 255) | |
90 | elseif GetVehicleEngineHealth(c_veh) < 0 then | |
91 | drawTxt(1.4068, 1.4, 1.0,1.0,0.31,"~b~ Avarii: " .. "~r~~h~ /!\\ ", 255, 255, 225, 255) | |
92 | end | |
93 | -- drawTxt(1.2, 1.2, 1.0,1.0,0.31,'Debug: ' .. GetVehicleEngineHealth(c_veh), 255, 255, 225, 255) | |
94 | ||
95 | --[[ | |
96 | local c_veh = GetVehiclePedIsIn(GetPlayerPed(-1),false) | |
97 | local plate_veh = GetVehicleNumberPlateText(c_veh) | |
98 | local lock_sts = GetVehicleDoorLockStatus(c_veh) -- Lock Status | |
99 | ]] | |
100 | end | |
101 | ||
102 | ||
103 | end | |
104 | end) |