Mam ma?y a zarazem dziwny problem z tunerem ?wiate?, a mianowicie oryginalnie gdzie jest po?o?ony to wszystko jest git: Wje?dzam, montuje i dzia?a..
Ale postanowi?em zmieni? lokalizacj? no i kordy by?y tylko markera oraz cuboidu...
Wchodz?c w marker wy?wietla si? komunikat : Na Miejscu monta?u nie znajduje si? pojazd... O co mo?e chodzi??
Witam ot??, niezbyt dobrze ogarniam, funkcj? na gie?dach, i mam problem z wstawieniem tej linijki na pobieranie koloru lamp
linijka
[lua]getVehicleHeadLightColor[/lua]
Czy kto? by m?g? mi to wstawi? do kody, by pisa?o na opisie pojazdu KOLOR LAMP oraz Kolor danych lamp
kod
[lua]local function aktualizujdane()
if not isElementWithinColShape(localPlayer,cuboid) then return end
for i,v in ipairs(getElementsByType("vehicle",root,true)) do
if getElementData(v, "vehicle:gielda",true) then
if getElementData(v, "vehicle:id") == getElementData(v, "vehicle:id:G") then
local online=znajdzprzezuid(getElementData(v,"vehicle:owner:UID"))
if online then jest="#00FF00Online" else jest="#FF0000Offline" end
--local Pojemnosc = getElementData(v,"Pojemnosc:silnika") or "Zwykla"
zawieszenie = getElementData(v,"Zawieszenie:Pneumatyczne")
if zawieszenie == 'Tak' then
Zawie = "Zawieszenie pneumatyczne,"
else
Zawie = ""
end
lpg = getElementData(v,"Zamontowane:LPG")
if lpg == 'Tak' then
gaz = "LPG, "
else
gaz = ""
end
drzwi = getElementData(v,"vehicle:drzwidogury")
if drzwi == 'Tak' then
Drzwii = "...
Czo?em, m?j problem dotyczy braku tekstur ?wiate?. KLIK
Dodam, ?e brak tekstur nie jest spowodowany dzia?aniem jakiego? skryptu i wyst?puje u wszystkich graczy, a sam problem nie pojawia w przypadku posiadania podmienionych modeli pojazd?w, a tylko tych oryginalnych.
Witajcie, mam problem z tekstur? ?wiate? po przerobieniu modelu pojazdu z GTA SA, w tym wypadku copcarla. Od wczoraj zacz??em modelowa? a bardziej przerabia? pojazdy w 3ds max. W modelu pojazdu wszystko dzia?a tak jak powinno ale dalej nie wiem czemu nie wida? tekstury ?wiate?. Zaznaczam ?e normalnie model przed edytowaniem dzia?a tak jak powinien. Jakie? rozwi?zania? Poni?ej za??czam zdj?cia.
local cs =createColCuboid(-2086.88,1398.54,3.70, 12.9384765625, 10.796737670898, 4.24375)
local mkr=createMarker(-2089.82,1398.96,7.19-0.90, "cylinder", 1.5, 255, 255, 255, 155)
addEventHandler("onClientResourceStart",resourceRoot,
function ()
for i,vehicle in ipairs (getElementsByType("vehicle")) do
loadVehicleLights(vehicle)
end
end
)
addEventHandler("onClientElementStreamIn",root,
function ()
if getElementType(source) == "vehicle" then
loadVehicleLights(source)
end
end
)
addEventHandler("onClientVehicleEnter",root,
function ()
loadVehicleLights(source)
end
)
function loadVehicleLights (vehicle)
local image = getElementData(vehicle,"vehicle:light")
if not image then return end
if not shaders[image] then
local texture = dxCreateTexture("images/"..image..".jpg","dxt3")
local shader = dxCreateShader("lights.fx")
dxSetShaderValue(shader,"gTexture",texture)
shaders[image] = shader
end
engineApplyShaderToWorldTexture(shaders[image],"vehiclelights128",vehicle)
engineApplyShaderToWorldTexture(shaders[image],"vehiclelightson128",vehicle) -- needs messing with alpha
end
function unloadVehicleLights (vehicle)
local image = getElementData(vehicle,"vehicle:light")
if not image then return end
engineRemoveShaderFromWorldTexture(shaders[...
Witam. Mam taki skrypt i nie dzia?a tak jak tego chc?. Chc? aby gdy ma si? w pojezdzie zamontowane ?wiat?o (Przedmiot. Gram na gamemodzie DayZ) to mo?na zapala? gasi? ?wiat?a ale w moim wypadku to nawet bez ?wiat?a zamontowanego w pojezdzie mo?na zapala? i gasi? ?wiat?a. Pomocy
[lua]function setLampStateByPlayer(playersource)
local veh = getPedOccupiedVehicle(playersource)
local col = getElementData(veh,"parent")
if getElementData(col,"Lamp_inVehicle") then
if (getVehicleOverrideLights(veh) == 2) then
setVehicleOverrideLights(veh, 1)
triggerClientEvent (playersource, "displayClientInfo", playersource,"Vehicle","?wiat?a wy??czone!",255,22,0)
else
setVehicleOverrideLights(veh, 2)
triggerClientEvent (playersource, "displayClientInfo", playersource,"Vehicle","?wiat?a w??czone!",22,255,0)
end
end
end
[/lua]
i
[lua]function onPlayerEnterDayzVehicle(veh,seat)
local col = getElementData(veh,"parent")
local id = getElementModel(veh)
if not seat == 0 then return end
local tires,engine,parts,lamp = getVehicleAddonInfos (id)
setElementData(veh,"maxfuel",getVehicleMaxFuel(col))
setElementData(veh,"needtires",tires)
setElementData(veh,"needengines",engine)
setElementData(veh,"needparts",parts)
setElementData(veh,"needlamp",lamp)
if ((getElementData(col,"Tire_inVehicle") or 0) <...
for i,v in pairs(strefyMontazu) do
if v.cuboid then
v.cs=createColCuboid(unpack(v.cuboid))
elseif v.colsphere then
v.cs=createColSphere(unpack(v.colsphere))
end
v.marker=createMarker(v.mpos[1], v.mpos[2], v.mpos[3], "cylinder", 1, 0,0,0,100)
setElementData(v.marker,"cs",v.cs)
setElementData(v.marker,"praca",v.praca)
end
local function czyElementWStrefieMontazu(e)
for i,v in pairs(strefyMontazu) do
if isElementWithinColShape(e,v.cs) then return true end
end
return false
end
local function pracownik(id)
local query=string.format("SELECT rank FROM lss_character_factions WHERE faction_id=3 AND character_id=%d", id)
local wynik=exports.DB:pobierzWyniki(query)
if (wynik and wynik.rank) then return true else return false end
end
[code]function zieloneswiatlaclient ()
if isElementWithinMarker (Vehicle, MarkerNiewidzialny) and
if isElementWithinMarker (ThePlayer, MarkerZielony ) then
triggerServerEvent ("swiatlazielone", getRootElement ())
else
outputChatBox ("Na stanowisku nir ma pojazdu, lub kod jest *****", source)
end
end
addEventHandler ("onClientMarkerHit", getRootElement (), zieloneswiatlaclient)[/code]
Witam, ot?? napisa?em ma?y keybind na LPM + 2 aby zapala? ?wiat?a.
Dzia?a?o to do jakiego? czasu, potem nagle dzia?a tylko za nocy.
No i druga sprawa, je?eli wysi?dzie si? z auta one automatycznie gasn? a chcia?bym by jednak nie gas?y a tak?e ?eby mo?na by?o je odpali? za dnia.
Witam. Chcia?bym uzyska? taki efekt, jak na tym filmiku od 18 sekundy.
Chodzi o obiekt ?wiec?cych kierunkowskaz?w.
Znalaz?em podobne ID obiektu, ale one ?wiec? wy??cznie w godzinach 20-6. Jak wi?c zrobi? by ?wieci?y ca?y czas?[/code]