Witam chcia?bym zrobi? prace dostawcy ale nie mog? zrobi? aby Spawni?a si? ci??ar?wka z naczep? razem i ?eby nie by?o mo?na jej odczepi?, macie pomys?y?
Zajmuję się pisaniem zaawansowanych skryptów lua na zamówienie za bardzo niską cene.
Oraz pomoc przy serwerze mta/forum i tym podobnych.
Discord: TomeQmix#7106
Zajmuję się pisaniem zaawansowanych skryptów lua na zamówienie za bardzo niską cene.
Oraz pomoc przy serwerze mta/forum i tym podobnych.
Discord: TomeQmix#7106
Mam problem bo nie pokazuje si? naczepa wgl i jest db3
Podpis
Zajmuję się pisaniem zaawansowanych skryptów lua na zamówienie za bardzo niską cene.
Oraz pomoc przy serwerze mta/forum i tym podobnych.
Discord: TomeQmix#7106
Teraz naczepa respi si? w Ci?zar?wce a nie podpina si? pod ni?
Podpis
Zajmuję się pisaniem zaawansowanych skryptów lua na zamówienie za bardzo niską cene.
Oraz pomoc przy serwerze mta/forum i tym podobnych.
Discord: TomeQmix#7106
addEventHandler("onMarkerHit", m1, function(el, md)
if getElementData(el, "zrespilGracz") then
outputChatBox("#919191[#0053FFCocaCola#919191]Praca w trakcie przygotowania.", el)
return
end
if not md or getElementType(el) ~= "player" or getPedOccupiedVehicle(el) then return end
local x,y,z = getElementPosition(el)
local bus = createVehicle(498, -130.81, -345.07, 2.04, 0.1, 0.0, 177.0)
setTimer(
function()
trailer = createVehicle ( 450, -130.81, -345.07, 2.04, 0.1, 0.0, 177.0 ) -- create a trailer
attachTrailerToVehicle ( bus, trailer ) -- attach them
end, 50, 1)
Dzia?a super a teraz ostatnie, da?o by rade ze jak wyjde z auta to Naczepa te? znika?
Podpis
Zajmuję się pisaniem zaawansowanych skryptów lua na zamówienie za bardzo niską cene.
Oraz pomoc przy serwerze mta/forum i tym podobnych.
Discord: TomeQmix#7106
addEventHandler("onMarkerHit", m1, function(el, md)
if getElementData(el, "zrespilGracz") then
outputChatBox("#919191[#0053FFCocaCola#919191]Praca w trakcie przygotowania.", el)
return
end
if not md or getElementType(el) ~= "player" or getPedOccupiedVehicle(el) then return end
local x,y,z = getElementPosition(el)
local bus = createVehicle(498, -130.81, -345.07, 2.04, 0.1, 0.0, 177.0)
setTimer(
function()
trailer = createVehicle ( 450, -130.81, -345.07, 2.04, 0.1, 0.0, 177.0 ) -- create a trailer
attachTrailerToVehicle ( bus, trailer ) -- attach them
setElementData(bus, "naczepa",true)
end, 50, 1)
addEventHandler("onVehicleExit",getRootElement(),function()
if getElementData(source, "naczepa") then
detachTrailerFromVehicle(bus,trailer)
destroyElement(trailer)
end
end)
Dzai?a Piwko A teraz mam problem bo nie pokazuje blipu, Nie wiem gdzie go da? zeby pokaza? sie blip do celu oto kod:
S
local b=createElement("text")
setElementData(b,"name","Coca Cola [RED COUNTY]")
setElementPosition(b,-123.02,-314.29,2.76)
local blip = createBlip (-123.02,-314.29,2.76, 46 ) -- miejsce pracy dorywczej "kierowca autobusu"
local m1 = createMarker(-123.02,-314.29,2.76, "cylinder", 1.5, 35, 142, 35)
vehs = {}
function removePreviousVehicles(plr)
for i,v in ipairs(getElementsByType("vehicle", resourceRoot)) do
local sby = getElementData(v, "zrespilGracz")
if sby and sby == plr and getPedOccupiedVehicle(plr) ~= v then
destroyElement(v)
end
end
end
addEventHandler("onMarkerHit", m1, function(el, md)
if getElementData(el, "zrespilGracz") then
outputChatBox("#919191[#0053FFCocaCola#919191]Praca w trakcie przygotowania.", el)
return
end
if not md or getElementType(el) ~= "player" or getPedOccupiedVehicle(el) then return end
local x,y,z = getElementPosition(el)
local bus = createVehicle(515, -130.81, -345.07, 2.04, 0.1, 0.0, 177.0)
setTimer(
function()
trailer = createVehicle ( 450, -130.81, -345.07, 2.04, 0.1, 0.0, 177.0 ) -- create a trailer
attachTrailerToVehicle ( bus, trailer ) -- attach them
setElementData(bus, "naczepa",true)
end, 50, 1)
addEventHandler("onVehicleExit",getRootElement(),function()
if getElementData(source, "naczepa") then
detachTrailerFromVehicle(bus,trailer)
destroyElement(trailer)
end
end)
setElementData(bus,"vehicle:desc","Coca Cola [RED COUNTY]")
setElementData(bus, "zrespilGracz", el)
setElementData(bus, "vehicle:fuel", 55)
setElementData(bus, "vehicle:mileage", 731)
setVehiclePlateText(bus, "CocaCola" )
setVehicleColor(bus, 0, 0, 255 )
setVehicleHandling(bus,"maxVelocity", 300.00) -- 40 + 10 = 50km/h
warpPedIntoVehicle(el, bus)
removePreviousVehicles(el)
triggerClientEvent(el, "STARTJobBus", resourceRoot, bus)
setVehicleHandling(bus,"maxVelocity", 300.00) -- 40 + 10 = 50km/h
vehs[el] = bus
end)
addEvent("STOPJobBus", true)
addEventHandler("STOPJobBus", resourceRoot, function()
local pojazd = getPedOccupiedVehicle(localPlayer)
if pojazd then
destroyElement(trailer)
destroyElement(pojazd)
end
end)
addEvent("destroyVeh", true)
addEventHandler("destroyVeh", getRootElement(),
function()
if vehs[source] then
if isElement(vehs[source]) then destroyElement(vehs[source]) end
end
end)
C
local districtsBus = {
{682.99,-440.98,17.29},
{-117.18,-321.12,1.42},
}
local jobTarget
local jobMarker
local jobVehicle
local maxTarget = #districtsBus
function finishJob()
if jobMarker and isElement(jobMarker) then
destroyElement(jobMarker)
jobMarker = nil
end
if jobTarget and isElement(jobTarget) then
destroyElement(jobTarget)
jobTarget = nil
jobTarget = 0
end
triggerServerEvent("destroyVeh", localPlayer)
end
function busDriver(el, md)
if el ~= localPlayer or not md then return end
if jobTarget > maxTarget and getPedOccupiedVehicle(el) then return end
if jobTarget == maxTarget and not getPedOccupiedVehicle(el) then return end
if jobTarget == #districtsBus then
finishJob()
playSoundFrontEnd(5)
outputChatBox("#919191[#0053FFCocaCola#919191]Zako?czy?e?[a?] prac?.",255,255,255,true)
else
showMarker()
playSoundFrontEnd(12)
triggerServerEvent("givePlayerMoney", localPlayer, 1250, 0)
end
end
function showMarker()
if jobMarker and isElement(jobMarker) then
outputChatBox("#919191[#0053FFCocaCola#919191]Dotarczy?es[as] Towar, Wracaj do fabryki.",255,255,255,true)
destroyElement(jobMarker)
blip = createBlipAttachedTo(cel, 41)
jobMarker = nil
end
jobTarget = jobTarget + 1
jobMarker = createMarker(districtsBus[jobTarget][1], districtsBus[jobTarget][2], districtsBus[jobTarget][3], "checkpoint", 4, 255, 255, 255)
blip = createBlipAttachedTo(cel, 41)
if districtsBus[jobTarget+1] then
ile = districtsBus[jobTarget+1]
setMarkerTarget(jobMarker, ile[1], ile[2], ile[3])
end
addEventHandler("onClientMarkerHit", jobMarker, busDriver)
end
addEvent("STARTJobBus", true)
addEventHandler("STARTJobBus", resourceRoot, function(veh)
outputChatBox("#919191[#0053FFCocaCola#919191]Rozpocz??e?[a?] prac?. Zawie? towar do sklepu, Wynagrodzenie 1250PLN",255,255,255,true)
jobVehicle = veh
jobTarget = 0
showMarker()
end)
addEventHandler("onClientResourceStop", resourceRoot, function()
if jobVehicle and getElementData(localPlayer, "gracz_praca") then
setElementData(localPlayer, "gracz_praca", false)
end
end)
addEventHandler("onClientVehicleExit", resourceRoot, function(plr, seat)
if seat == 0 then
if plr == localPlayer then
finishJob()
destroyElement(blip)
outputChatBox("#919191[#0053FFCocaCola#919191]Zako?czy?e?[a?] prac?",255,255,255,true)
end
end
end)
Podpis
Zajmuję się pisaniem zaawansowanych skryptów lua na zamówienie za bardzo niską cene.
Oraz pomoc przy serwerze mta/forum i tym podobnych.
Discord: TomeQmix#7106
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