1) Файл survivorSystem_client.lua 2) Редактор Lua (Рекомендую Notepad ++)
Для того чтобы поменять стандартное название авто на свое, ищем строку --Vehicletags Видим следующий код(в чистом моде):
local x,y,z = getElementPosition(getLocalPlayer()) for i,veh in ipairs(getElementsByType("vehicle")) do local px,py,pz = getElementPosition (veh) local vehID = getElementModel(veh) local vehicle = getPedOccupiedVehicle(getLocalPlayer()) if veh ~= vehicle then if vehID ~= 548 then local pdistance = getDistanceBetweenPoints3D ( x,y,z,px,py,pz ) if pdistance <= 6 then --Get screenposition local sx,sy = getScreenFromWorldPosition ( px, py, pz+0.95, 0.06 ) if sx and sy then --Draw Vehicle local w = dxGetTextWidth(getVehicleName(veh),1.02,"default-bold") dxDrawText ( getVehicleName(veh), sx-(w/2), sy, sx-(w/2), sy, tocolor ( 100, 255, 100, 200 ), 1.02, "default-bold" ) end end end end end
Теперь, допустим мы хотим заменить название Clover на (Chevrolet Camaro SS)
Проделываем следующие действия
После строки
ocal w = dxGetTextWidth(getVehicleName(veh),1.02,"default-bold")
Добавляем следующий код
local _vName = getVehicleName(veh) local _vModel = getVehicleModelFromName(_vName) if (_vModel == 542) then _vText = "Chevrolet Camaro SS" end
В переменную _vName у нас получает название машины затем в переменной _vModel мы получим ID нашего автомобиля и далее мы сверяем, если ID машины 542(Clover),то мы называем его "Сhevrolet Camaro SS"
local x,y,z = getElementPosition(getLocalPlayer()) for i,veh in ipairs(getElementsByType("vehicle")) do local px,py,pz = getElementPosition (veh) local vehID = getElementModel(veh) local vehicle = getPedOccupiedVehicle(getLocalPlayer()) if veh ~= vehicle then if vehID ~= 548 then local pdistance = getDistanceBetweenPoints3D ( x,y,z,px,py,pz ) if pdistance <= 6 then --Get screenposition local sx,sy = getScreenFromWorldPosition ( px, py, pz+0.95, 0.06 ) if sx and sy then --Draw Vehicle local w = dxGetTextWidth(getVehicleName(veh),1.02,"default-bold") local _vName = getVehicleName(veh) local _vModel = getVehicleModelFromName(_vehN) if (_vehM == 542) then _vText = "Chevrolet Camaro SS" end dxDrawText ( dxDrawText ( _vText, sx-(w/2), sy, sx-(w/2), sy, tocolor ( 209,252,115, 200 ), 1.02, "default-bold" ) end end end end end
Не забываем прописать так как мы сделали с (Clover)
Ставьте лайк,если вам помог мой тутор Я пацан в мта вылаживаю ресурсы