[b]Witam potrzebuj? pomocy w skrypcie,
ot?? mam skrypt na prace i w ka?dej z nich po wyj?ciu z np auta ono znika problem pojawia si? wtedy gdy kto? zrobi /quit albo /reconnect lub /disconnect
wtedy auto nie znika i stoi ... dop?ki nie zrestartuje si? skryptu prosz? pom??cie daj? wam kawa?ek skryptu
Chodzi mi o to ?e jak gracz wpisze np /quit to usunie sie pojazd [/b]
client:
[quote]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",resourceRoot,jobVehicle)
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)
triggerServerEvent("givePlayerMoney", localPlayer, 20, 0)
end
end
function showMarker()
if jobMarker and isElement(jobMarker) then
des... |