P43tous Posted September 26, 2019 Share Posted September 26, 2019 E ai galera, Alguém pode me ajudar a tirar o nome dos veículos do MTA Dayz, ou a mudar o nome deles.? Link to comment
P43tous Posted September 26, 2019 Author Share Posted September 26, 2019 13 minutes ago, joao2235 said: Manda o script. Arquivo VehiclesTable vehiclesTable = { -- {NameID,Eng,Tire,Parts,Rot,Glass,Slots,Fuel,FuelPerMinute} {"Bullet",541,1,4,1,0,4,100,100,0.1}, } --engine,tires,parts,rotor,glass,slots,fuel,fuelpm = getVehicleAddonInfos(getElementModel(veh)) function getVehicleAddonInfos(ID) for _,veh in pairs(vehiclesTable)do if ID == veh[2] then return veh[3],veh[4],veh[5],veh[6],veh[7],veh[8],veh[9],veh[10] end end end vehSpawns = {} vehSpawns["Bullet"] = { {125.48611450195,1959.5675048828,19.469860076904,0,0,50} } arquivo Vehicle_Spawn function spawnDayZVehicles() for i,vehs in pairs(vehiclesTable)do spawnedVehs = {} count = math.random(1,#vehSpawns[vehs[1]]) for i=1,count do num = math.random(1,#vehSpawns[vehs[1]]) if not isVehSpawned(num) then table.insert(spawnedVehs,num) x,y,z = vehSpawns[vehs[1]][num][1],vehSpawns[vehs[1]][num][2],vehSpawns[vehs[1]][num][3] veh = createVehicle(vehs[2],x,y,z) vehCol = createColSphere(x,y,z,4) attachElements(vehCol,veh,0,0,0) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots",vehs[8]) engRand = math.random(0,vehs[3]) tireRand = math.random(0,vehs[4]) partRand = math.random(0,vehs[5]) rotorRand = math.random(0,vehs[6]) glaRand = math.random(0,vehs[7]) setElementData(vehCol,"Engine_inVehicle",engRand) setElementData(vehCol,"Tire_inVehicle",tireRand) setElementData(vehCol,"Parts_inVehicle",partRand) setElementData(vehCol,"Rotor_inVehicle",rotorRand) setElementData(vehCol,"Glass_inVehicle",glaRand) setElementData(vehCol,"spawn",{vehs[2],x,y,z}) setElementData(vehCol,"fuel",10) setElementData(vehCol,"ProtectionPercent",0) setElementData(vehCol,"maxfuel",vehs[9]) setElementData(vehCol,"needengines",vehs[3]) setElementData(vehCol,"needtires",vehs[4]) setElementData(vehCol,"needparts",vehs[5]) setElementData(vehCol,"needrotor",vehs[6]) setElementData(vehCol,"needglass",vehs[7]) if tireRand >= 1 then setElementData(vehCol,"TireState",math.random(0,100)) else setElementData(vehCol,"TireState",100) end if engRand >= 1 then setElementData(vehCol,"EngineState",math.random(0,100)) else setElementData(vehCol,"EngineState",100) end if rotorRand >= 1 then setElementData(vehCol,"RotorState",math.random(0,100)) else setElementData(vehCol,"RotorState",100) end if partRand >= 1 then setElementData(vehCol,"PartsState",math.random(0,100)) else setElementData(vehCol,"PartsState",100) end end end end end Arquivo Menu_Client function showClientMenuItem(arg1,arg2,arg3,arg4) theTableMenuScroll = {} setElementData(getLocalPlayer(),"usedItem",false) numberMenuScroll = 1 if arg1 == "Take" then createScrollMenuMessage("Take "..arg2.." ("..(getElementData(arg3,"quantity") or 1)..")",255,255,255,arg2) setElementData(getLocalPlayer(),"usedItem",true) end if arg1 == "stop" then disableMenu() refreshLoot(false) end if arg1 == "Helicrash" then createScrollMenuMessage("Gear Helicrash",255,255,255,"helicrash") setElementData(getLocalPlayer(),"usedItem",true) end if arg1 == "BMPcrash" then createScrollMenuMessage("Gear BMPcrash",255,255,255,"BMPCrash") setElementData(getLocalPlayer(),"usedItem",true) end if arg1 == "BoxMilitary" then createScrollMenuMessage("Gear Box",255,255,255,"BoxMilitary") setElementData(getLocalPlayer(),"usedItem",true) end if arg1 == "Hospitalbox" then createScrollMenuMessage("Gear Hospitalbox",255,255,255,"hospitalbox") setElementData(getLocalPlayer(),"usedItem",true) end if arg1 == "Vehicle" then createScrollMenuMessage("Gear ("..arg2..")",255,255,255,"vehicle") setElementData(getLocalPlayer(),"usedItem",true) if getElementData(getElementData(arg3,"parent"),"tent") then createScrollMenuMessage("Remove Tent",255,255,255,"tent") return end Link to comment
joao2235 Posted September 26, 2019 Share Posted September 26, 2019 Todos os veículos ele coloca nome em cima ? Link to comment
P43tous Posted September 26, 2019 Author Share Posted September 26, 2019 58 minutes ago, joao2235 said: Todos os veículos ele coloca o nome em cima? sim no caso ele cria um menu com o nome do veiculo e também coloco o nome em cima Link to comment
DNL291 Posted September 29, 2019 Share Posted September 29, 2019 O dx com os nomes dos veículos não estão nesses scripts postados. Link to comment
P43tous Posted September 29, 2019 Author Share Posted September 29, 2019 Você consegue me ajudar, não faço ideia onde encontro esse arquivo. Link to comment
root. Posted September 29, 2019 Share Posted September 29, 2019 10 hours ago, P43tous said: Você consegue me ajudar, não faço ideia onde encontro esse arquivo. Você deve procurar o evento onClientRender em um dos arquivos do cliente Link to comment
P43tous Posted September 29, 2019 Author Share Posted September 29, 2019 18 minutes ago, Rut said: Você deve procurar o evento no ClientRender em um dos arquivos do cliente ai que ta não muda de uma olhada ... g_Root = getRootElement() g_thisRes = getThisResource() changeTable = {} changeTable[468] = "Yamaha YZ 250 FMX" --sanchez changeTable[495] = "F150 RAPTOR" -- sandking changeTable[542] = "1971 Plymouth GTX" -- clover changeTable[431] = "Scholl Bus" --bus changeTable[470] = "Patriot SpecialForce 4X4" -- patriot changeTable[422] = "Hilux Tactical Desert4X4" -- bobcat changeTable[483] = "UAZ 2206" -- camper changeTable[487] = "UH-1H" -- maverick changeTable[596] = "Dodge ChallengerSRT8 POLICE" -- maverick changeTable[541] = "Zenvo TRS" -- bullet changeTable[411] = "Nissan GTR" -- infernus changeTable[521] = "Honda CB1000" -- fcr900 changeTable[461] = "Kawasaki Z800" -- pcj600 changeTable[522] = "Honda 650F" -- nrg500 changeTable[471] = "ATV Militar" -- quad changeTable[425] = "ATV Militar" -- hunter function setup( theRes ) if theRes == g_thisRes then setPlayerHudComponentVisible( "vehicle_name", false) screenWidth, screenHeight = guiGetScreenSize ( ) end end addEventHandler( "onClientResourceStart", g_Root, setup ) function finishup( theRes ) if theRes == g_thisRes then setPlayerHudComponentVisible( "vehicle_name", true) end end addEventHandler( "onClientResourceStop", g_Root, finishup ) function textShow() local posX = screenWidth/2 local posY = screenHeight*(2/3) for P=-5,5 do for Q=-5,5 do dxDrawText(theVehName, posX+P, posY+Q, posX+P, posY+Q, tocolor(00,00,00,theAlpha), 3, "sans", "center") end end dxDrawText(theVehName, posX, posY, posX, posY, tocolor(54,104,44,theAlpha), 3, "sans", "center") end function textFade() theAlpha=theAlpha-10 if theAlpha<0 then theAlpha=255 removeEventHandler( "onClientRender", g_Root, textShow ) end end function startTextFade() setTimer( textFade, 50, 26) end function nameToggle() local theVeh = getPedOccupiedVehicle(localPlayer) local theVehID = getElementModel(theVeh) theVehName = changeTable[theVehID] if not theVehName then theVehName = getVehicleName(theVeh) end theAlpha = 255 addEventHandler( "onClientRender", g_Root, textShow ) setTimer( startTextFade, 5000, 1) end addCommandHandler("name",nameToggle) function textStart() local theVehID = getElementModel(source) theVehName = changeTable[theVehID] if not theVehName then theVehName = getVehicleName(source) end theAlpha = 255 addEventHandler ( "onClientRender", g_Root, textShow ) setTimer( startTextFade, 5000, 1) end addEventHandler("onClientVehicleEnter", getRootElement(),textStart) Não muda o nome de cima do veiculo nem oculta. ele aparace os dois dai..... Link to comment
Furzy Posted September 29, 2019 Share Posted September 29, 2019 Da uma checada no menu_client e survivorSystem_Client Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now