Dlaczego Skrypt Nie Dzi?a Jestem Pocz?tkuj?czym
[lua]
local bsMarker = createMarker(-1753.84,961.92,24,"cylinder",1.5,252,0,255,50)
createBlipAttachedTo(bsMarker,59)
local districtsBus = {
{45.83,1201.23,18.81},
{-66.73,1201.60,19.59},
{-68.33,1148.97,19.59},
{24.26,1144.16,19.59},
{26.12,1102.61,19.59},
{-65.06,1101.15,19.59},
{-185.69,1100.93,19.60},
{-188.17,1193.49,19.55},
{-115.97,1196.37,19.59},
{-117.24,1251.94,17.41},
{-73.71,1256.68,12.09},
{64.41,1220.31,18.83},
}
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("* Zako?czy?e?/a? prac?.")
else
showMarker()
playSoundFrontEnd(12)
triggerS... |