sossa0108 Posted March 28, 2014 Share Posted March 28, 2014 Hola, Alguien me podria ayudar aca con esto? El Script no identifica nada desde El do Es para un servidor dayz Porfavor necesito ayuda veh = createVehicle (568, 312.05630493164, 2505.0859375, 16.490823745728) setElementData(veh , "owner", "sossa0108") setVehicleDamageProof (veh, true ) function onLockedVehicleEnter ( player, seat, jacked ) if getElementData(source, "owner") and getElementData(source, "owner" ) ~= getAccountName(getPlayerAccount(player)) and ( seat == 0 ) then outputChatBox ("Propiedad De "..tostring(getElementData(source, "owner" )), player, 255, 50, 0) cancelEvent() do local x, y, z = getElementPosition(thePlayer) vehCol = createColSphere(x + 5, y, z, 2.5) attachElements(vehCol, veh, 0, 0, 0) setElementData(vehCol, "parent", veh) setElementData(veh, "parent", vehCol) setElementData(vehCol, "vehicle", true) setElementData(vehCol, "MAX_Slots", 40) local tires, engine, parts = getVehicleAddonInfos(getElementModel(veh)) setElementData(vehCol, "Tire_inVehicle", 4) setElementData(vehCol, "Engine_inVehicle", 1) setElementData(vehCol, "Parts_inVehicle", 1) setElementData(vehCol, "spawn", { 568, x, y, z }) setElementData(vehCol, "fuel", 100) end end end addEventHandler ( "onVehicleStartEnter", getRootElement(), onLockedVehicleEnter ) vehicleAddonsInfo = { { 568, 4, 1, 1 } } function getVehicleAddonInfos(id) for i, veh in ipairs(vehicleAddonsInfo) do if veh[1] == id then return veh[2], veh[3], veh[4] end end end vehicleFuelInfo = { {568, 0.25} } function getVehicleAddonInfos(id) for i, veh in ipairs(vehicleAddonsInfo) do if veh[1] == id then return veh[2], veh[3], veh[4] end end end vehicleFuelTable = { {568, 100} } function getVehicleMaxFuel(loot) local modelID = getElementModel(getElementData(loot, "parent")) for i, vehicle in ipairs(vehicleFuelTable) do if modelID == vehicle[1] then return vehicle[2] end end return false end function onPlayerEnterdayZVehBobicle(veh, seat) local col = getElementData(dayZVehBob, "parent") local id = getElementModel(dayZVehBob) if not seat == 1 then return end local tires, engine, parts = getVehicleAddonInfos(id) setVehicleEngineState(dayZVehBob, false) setElementData(dayZVehBob, "maxfuel", getVehicleMaxFuel(col)) setElementData(dayZVehBob, "needtires", tires) setElementData(dayZVehBob, "needengines", engine) setElementData(dayZVehBob, "needparts", parts) if getElementData(col, "Tire_inVehicle") or 0 < tonumber(tires) then setVehicleEngineState(dayZVehBob, false) return end if getElementData(col, "Engine_inVehicle") or 0 < tonumber(engine) then setVehicleEngineState(dayZVehBob, false) return end if not getElementData(col, "Parts_inVehicle") then setElementData(col, "Parts_inVehicle", math.random(0, parts)) end if getElementData(col, "fuel") or 1 >= 0 and not getElementModel(dayZVehBob) == 509 then triggerClientEvent(source, "displayClientInfo", source, "Vehicle", "No tank left in this vehicle!", 22, 255, 0) setVehicleEngineState(dayZVehBob, false) return end end Link to comment
Alexs Posted March 28, 2014 Share Posted March 28, 2014 Es un poco complicado ayudar con errores sin una explicación concreta, intenta seguir las pautas de este post: viewtopic.php?f=145&t=54094 Link to comment
sossa0108 Posted March 28, 2014 Author Share Posted March 28, 2014 Es un poco complicado ayudar con errores sin una explicación concreta, intenta seguir las pautas de este post:viewtopic.php?f=145&t=54094 mira Lo que pasa es que quiero que se cree el coche pero aparesca con las llantas, engine, Etc Es para poner los coches privados en dayz Pero no aparece las llantas, engine, me puedes ayudar? Link to comment
Recommended Posts