for i,v in ipairs(getElementsByType("vehicle")) do
if getElementModel(v) == 407 then
marker = createMarker(0, 0, 0, "cylinder", 1.1, 255, 0, 0, 20)
attachElements(marker, v, 0, -4.5, -1)
end
end
addEventHandler("onMarkerHit", marker, function(hit)
local frakcja = getElementData(hit, "player:duty")
if frakcja and frakcja == "LVFD" then
giveWeapon(hit, 42, 9999)
setPedWeaponSlot(hit, 9)
else
takeWeapon(hit, 42)
end
setElementData(hit, "linia:LVFD", not getElementData(hit, "linia:LVFD"))
triggerClientEvent(root, "linia:LVFD", root, hit, source)
setElementData(hit, "wazm", source)
end)
addEventHandler("onPlayerWeaponSwitch", root, function(last)
if last == 42 and getElementData(source, "linia:LVFD") then
setPedWeaponSlot(source, 9)
end
end)
ERROR: Loading script failed: waz/c.lua:69 'end' excepted (to close 'function' at line 8) near '<eof>'
C:
engineImportTXD (engineLoadTXD("pradownica.txd"), 366)
engineReplaceModel(engineLoadDFF("pradownica.dff", 366), 366)
local img = dxCreateTexture("linia.png")
local posiadacze = { }
local pozycje = { }
addEventHandler("onClientRender", root, function()
for i2,v2 in ipairs(posiadacze) do
if v2[1] and isElement(v2[1]) and not isPedInVehicle(v2[1]) then
for i,v in ipairs(pozycje) do
if (pozycje[i + 1] ~= nil) then
dxDrawMaterialLine3D(pozycje[i].x, pozycje[i].y+0.2, pozycje[i].z+1, pozycje[i + 1].x, pozycje[i + 1].y+0.2, pozycje[i + 1].z+1, img, 0.10, tocolor(150,150,150,255))
else
local x,y,z = getPedBonePosition(v2[1], 25)
dxDrawMaterialLine3D(pozycje[i].x, pozycje[i].y+0.2, pozycje[i].z+1, x, y, z, img, 0.10, tocolor(150,150,150,255))
end
end
end
end
local x1, y1, z1
addEventHandler("onClientRender", root, function()
if getElementData(localPlayer, "linia:LVFD") then
if getPedOccupiedVehicle(localPlayer) then return end
if not x1 then
x1, y1, z1 = getElementPosition(getElementData(localPlayer, "wazm"))
end
if #pozycje > 0 then
for i, v in ipairs(pozycje) do
if i == #pozycje then
x1, y1, z1 = v.x, v.y, v.z
end
end
end
local x2, y2, z2 = getElementPosition(localPlayer)
local dystans = getDistanceBetweenPoints3D(x1, y1, z1, x2, y2, z2)
outputChatBox(""..x1..", "..y1..", "..z1.."")
if dystans > 1.5 then
--outputChatBox(#pozycje)
mark = createMarker(x2, y2, z2-1, "arrow", 1, 255, 255, 255, 50)
addEventHandler("onClientMarkerHit", mark, destroyM)
table.insert(pozycje, {marker = mark, x = x2, y = y2, z = z2-1.95})
--x1, y1, z1 = x2, y2, z2-1
end
end
end)
function destroyM(gracz)
if gracz ~= localPlayer then return end
for i, v in ipairs(pozycje) do
if v.marker == source then
table.remove(pozycje, i)
destroyElement(v.marker)
end
end
end
addEvent("linia:LVFD", true)
addEventHandler("linia:LVFD", root, function(plr,v)
for i = 1,#posiadacze do
if posiadacze[i][1] == plr then
table.remove(posiadacze, i)
return
end
end
table.insert(posiadacze, {plr,v})
end)
engineImportTXD (engineLoadTXD("pradownica.txd"), 366)
engineReplaceModel(engineLoadDFF("pradownica.dff", 366), 366)
local img = dxCreateTexture("linia.png")
local posiadacze = { }
local pozycje = { }
addEventHandler("onClientRender", root, function()
for i2,v2 in ipairs(posiadacze) do
if v2[1] and isElement(v2[1]) and not isPedInVehicle(v2[1]) then
for i,v in ipairs(pozycje) do
if (pozycje[i + 1] ~= nil) then
dxDrawMaterialLine3D(pozycje[i].x, pozycje[i].y+0.2, pozycje[i].z+1, pozycje[i + 1].x, pozycje[i + 1].y+0.2, pozycje[i + 1].z+1, img, 0.10, tocolor(150,150,150,255))
else
local x,y,z = getPedBonePosition(v2[1], 25)
dxDrawMaterialLine3D(pozycje[i].x, pozycje[i].y+0.2, pozycje[i].z+1, x, y, z, img, 0.10, tocolor(150,150,150,255))
end
end
end
end
end
local x1, y1, z1
addEventHandler("onClientRender", root, function()
if getElementData(localPlayer, "linia:LVFD") then
if getPedOccupiedVehicle(localPlayer) then return end
if not x1 then
x1, y1, z1 = getElementPosition(getElementData(localPlayer, "wazm"))
end
if #pozycje > 0 then
for i, v in ipairs(pozycje) do
if i == #pozycje then
x1, y1, z1 = v.x, v.y, v.z
end
end
end
local x2, y2, z2 = getElementPosition(localPlayer)
local dystans = getDistanceBetweenPoints3D(x1, y1, z1, x2, y2, z2)
outputChatBox(""..x1..", "..y1..", "..z1.."")
if dystans > 1.5 then
--outputChatBox(#pozycje)
mark = createMarker(x2, y2, z2-1, "arrow", 1, 255, 255, 255, 50)
addEventHandler("onClientMarkerHit", mark, destroyM)
table.insert(pozycje, {marker = mark, x = x2, y = y2, z = z2-1.95})
--x1, y1, z1 = x2, y2, z2-1
end
end
end)
function destroyM(gracz)
if gracz ~= localPlayer then return end
for i, v in ipairs(pozycje) do
if v.marker == source then
table.remove(pozycje, i)
destroyElement(v.marker)
end
end
end
addEvent("linia:LVFD", true)
addEventHandler("linia:LVFD", root, function(plr,v)
for i = 1,#posiadacze do
if posiadacze[i][1] == plr then
table.remove(posiadacze, i)
return
end
end
table.insert(posiadacze, {plr,v})
end)
Podpis
Skrypty/Grafiki na zamówienie!
Kontakt: Discord R35#5507
engineImportTXD (engineLoadTXD("pradownica.txd"), 366)
engineReplaceModel(engineLoadDFF("pradownica.dff", 366), 366)
local img = dxCreateTexture("linia.png")
local posiadacze = { }
local pozycje = { }
addEventHandler("onClientRender", root, function()
for i2,v2 in ipairs(posiadacze) do
if v2[1] and isElement(v2[1]) and not isPedInVehicle(v2[1]) then
for i,v in ipairs(pozycje) do
if (pozycje[i + 1] ~= nil) then
dxDrawMaterialLine3D(pozycje[i].x, pozycje[i].y+0.2, pozycje[i].z+1, pozycje[i + 1].x, pozycje[i + 1].y+0.2, pozycje[i + 1].z+1, img, 0.10, tocolor(150,150,150,255))
else
local x,y,z = getPedBonePosition(v2[1], 25)
dxDrawMaterialLine3D(pozycje[i].x, pozycje[i].y+0.2, pozycje[i].z+1, x, y, z, img, 0.10, tocolor(150,150,150,255))
end
end
end
end
end
addEventHandler("onClientRender", root, function()
if getElementData(localPlayer, "linia:LVFD") then
if getPedOccupiedVehicle(localPlayer) then return end
local x1
if not x1 then
x1, y1, z1 = getElementPosition(getElementData(localPlayer, "wazm"))
end
if #pozycje > 0 then
for i, v in ipairs(pozycje) do
if i == #pozycje then
x1, y1, z1 = v.x, v.y, v.z
end
end
end
local x2, y2, z2 = getElementPosition(localPlayer)
local dystans = getDistanceBetweenPoints3D(x1, y1, z1, x2, y2, z2)
outputChatBox(""..x1..", "..y1..", "..z1.."")
if dystans > 1.5 then
--outputChatBox(#pozycje)
mark = createMarker(x2, y2, z2-1, "arrow", 1, 255, 255, 255, 50)
addEventHandler("onClientMarkerHit", mark, destroyM)
table.insert(pozycje, {marker = mark, x = x2, y = y2, z = z2-1.95})
--x1, y1, z1 = x2, y2, z2-1
end
end
end)
function destroyM(gracz)
if gracz ~= localPlayer then return end
for i, v in ipairs(pozycje) do
if v.marker == source then
table.remove(pozycje, i)
destroyElement(v.marker)
end
end
end
addEvent("linia:LVFD", true)
addEventHandler("linia:LVFD", root, function(plr,v)
for i = 1,#posiadacze do
if posiadacze[i][1] == plr then
table.remove(posiadacze, i)
return
end
end
table.insert(posiadacze, {plr,v})
end)
Podpis
Skrypty/Grafiki na zamówienie!
Kontakt: Discord R35#5507
engineImportTXD (engineLoadTXD("pradownica.txd"), 366)
engineReplaceModel(engineLoadDFF("pradownica.dff", 366), 366)
local img = dxCreateTexture("linia.png")
local posiadacze = { }
local pozycje = { }
addEventHandler("onClientRender", root, function()
for i2,v2 in ipairs(posiadacze) do
if v2[1] and isElement(v2[1]) and not isPedInVehicle(v2[1]) then
for i,v in ipairs(pozycje) do
if (pozycje[i + 1] ~= nil) then
dxDrawMaterialLine3D(pozycje[i].x, pozycje[i].y+0.2, pozycje[i].z+1, pozycje[i + 1].x, pozycje[i + 1].y+0.2, pozycje[i + 1].z+1, img, 0.10, tocolor(150,150,150,255))
else
local x,y,z = getPedBonePosition(v2[1], 25)
dxDrawMaterialLine3D(pozycje[i].x, pozycje[i].y+0.2, pozycje[i].z+1, x, y, z, img, 0.10, tocolor(150,150,150,255))
end
end
end
end
end)
addEventHandler("onClientRender", root, function()
if getElementData(localPlayer, "linia:LVFD") then
if getPedOccupiedVehicle(localPlayer) then return end
local x1
if not x1 then
x1, y1, z1 = getElementPosition(getElementData(localPlayer, "wazm"))
end
if #pozycje > 0 then
for i, v in ipairs(pozycje) do
if i == #pozycje then
x1, y1, z1 = v.x, v.y, v.z
end
end
end
local x2, y2, z2 = getElementPosition(localPlayer)
local dystans = getDistanceBetweenPoints3D(x1, y1, z1, x2, y2, z2)
outputChatBox(""..x1..", "..y1..", "..z1.."")
if dystans > 1.5 then
--outputChatBox(#pozycje)
mark = createMarker(x2, y2, z2-1, "arrow", 1, 255, 255, 255, 50)
addEventHandler("onClientMarkerHit", mark, destroyM)
table.insert(pozycje, {marker = mark, x = x2, y = y2, z = z2-1.95})
--x1, y1, z1 = x2, y2, z2-1
end
end
end)
function destroyM(gracz)
if gracz ~= localPlayer then return end
for i, v in ipairs(pozycje) do
if v.marker == source then
table.remove(pozycje, i)
destroyElement(v.marker)
end
end
end
addEvent("linia:LVFD", true)
addEventHandler("linia:LVFD", root, function(plr,v)
for i = 1,#posiadacze do
if posiadacze[i][1] == plr then
table.remove(posiadacze, i)
return
end
end
table.insert(posiadacze, {plr,v})
end)
Podpis
Skrypty/Grafiki na zamówienie!
Kontakt: Discord R35#5507
for i,v in ipairs(getElementsByType("vehicle")) do
if getElementModel(v) == 407 then -- tutaj dodaj and getElementModel(V) == idpojazdu
marker = createMarker(0, 0, 0, "cylinder", 1.1, 255, 0, 0, 20)
attachElements(marker, v, 0, -4.5, -1)
end
end
Podpis
Skrypty/Grafiki na zamówienie!
Kontakt: Discord R35#5507
Damian2511, ?le napisa?em. Na FRAKCYJNYM pojezdzie fire truck pojawia sie marker z ty?u ale nie daje nam pr?downicy, a gdy wejde w marker od respionego to daje
Nie możesz pisać nowych tematów Nie możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach