Vice Admin: Jeśli potrzebujesz pomocy w sprawach organizacyjnych lub technicznych - skontaktuj się ze mną.
Na pewno spr?bujemy pom?c
Wpisz komende /debuscript 3
Oraz jesli b?d? tam widoczne ?e s? jakie? b??dy to napisz nam tu jakie lub zrob ss i daj go tutaj
error: admin/client/admin_client.lua:129:attempt to call a nil value
Na pewno spr?bujemy pom?c
Wpisz komende /debuscript 3
Oraz jesli b?d? tam widoczne ?e s? jakie? b??dy to napisz nam tu jakie lub zrob ss i daj go tutaj
Eror: loading script failed: Dilerka_praca/server.lua:171: 'end' expected <to close 'inf' at line 62> near '<eof>'
Oto ci chodzi ? w consoli wpisa?o od 129 linki
function startJobEtap(plr)
if (plr==localPlayer) then
if getElementData(plr,"player:job:materialy:etap") == 1 then
if playerpoints >= maxpoints then
setElementData(plr,"player:job:materialy:etap",2)
startJobEtap(plr)
return
end
marker = createMarker(-1834.96924, 1035.80762, 46.08785, 92.075073242188-1.2,"cylinder",1.5,255,255,0,200)
setElementInterior(marker, 0)
addEventHandler("onClientMarkerHit",marker,function(plr)
if (plr==localPlayer) then
if getElementData(plr,"player:job") then
toggleControl("sprint",false)
toggleControl("enter_exit",false)
toggleControl("jump",false)
triggerServerEvent("giveObject:buildingjob",plr,plr)
destroyElement(marker)
markern = createMarker(-1824.58569, 1027.90466, 45.23264-1.2,"cylinder",1.5,255,255,0,150)
setElementInterior(markern, 0)
addEventHandler("onClientMarkerHit",markern,function(plr)
if (plr==localPlayer) then
if getElementData(plr,"player:job") then
if not isPedInVehicle(plr) then
triggerServerEvent("destroyElement:buildingjob",plr,plr)
destroyElement(markern)
playerpoints = tonumber(playerpoints) + 1
toggleControl("sprint",true)
toggleControl("enter_exit",true)
toggleControl("jump",true)
startJobEtap(plr)
end
end
end
end)
end
end
end)
end
if getElementData(plr,"player:job:materialy:etap") == 2 then
setElementFrozen(plr,true)
setTimer(function()
setElementInterior(plr,0)
triggerServerEvent("createVehicle:buildingjob",plr,plr)
local rnd = math.random(1,#pointsNEXT)
point = createMarker(pointsNEXT[rnd][1],pointsNEXT[rnd][2],pointsNEXT[rnd][3]-2,"cylinder",4,0,0,255,150)
blip = createBlipAttachedTo(point,12)
addEventHandler("onClientMarkerHit",point,function(plr)
if (plr==localPlayer) then
if getElementData(plr,"player:job") then
if isPedInVehicle(plr) then
outputChatBox("?wietna robota! Za godn? podziwu prac? otrzymujesz wynagrodzenie!",0,255,0)
setElementData(plr,"player:job",false)
setElementData(plr,"player:job:materialy:etap",false)
triggerServerEvent("destroyElement:buildingjob",plr,plr)
triggerServerEvent("destroyVehicle:buildingjob",plr,plr)
endJob(plr)
setElementData(plr,"DM:unlock",true)
local kasa = math.random(200000,225000)
local kasapremium = math.random(225000,250000)
if getElementData(localPlayer,"player:premium") then
givePlayerMoney(kasapremium)
else
givePlayerMoney(kasa)
end
fadeCamera(false)
setTimer(function()
fadeCamera(true)
end,3500,1)
playerpoints = 0
timerrrrr[plr] = setTimer(function()
setElementPosition(plr,-1843.88684, 995.08228, 45.85445)
end,2500,1)
else
endJob(plr)
end
else
endJob(plr)
end
end
end)
end,1000,1)
end
end
end
addEventHandler("onClientVehicleExit",resourceRoot,function(plr,seat)
if plr == localPlayer then
endJob(plr)
setElementData(plr,"player:job",false)
setElementData(plr,"player:job:materialy:etap",false)
triggerServerEvent("destroyElement:buildingjob",plr,plr)
triggerServerEvent("destroyVehicle:buildingjob",plr,plr)
playerpoints = 0
end
end)
addEventHandler("onClientPlayerWasted",root,function()
if source == localPlayer then
endJob(source)
setElementData(source,"player:job",false)
setElementData(source,"player:job:materialy:etap",false)
triggerServerEvent("destroyElement:buildingjob",source,source)
triggerServerEvent("destroyVehicle:buildingjob",source,source)
playerpoints = 0
end
end)
fileDelete("client.lua")
droper24hp, podaj kod admin_client.lua z pliku admin linijka 129....
a tak na powaznie podaj bledy db3 z tego skryptu!!!
Eror: loading script failed: Dilerka_praca/server.lua:171: 'end' expected <to close 'inf' at line 62> near '<eof>'
Oto ci chodzi ? w consoli wpisa?o od 129 linki
function startJobEtap(plr)
if (plr==localPlayer) then
if getElementData(plr,"player:job:materialy:etap") == 1 then
if playerpoints >= maxpoints then
setElementData(plr,"player:job:materialy:etap",2)
startJobEtap(plr)
return
end
marker = createMarker(-1834.96924, 1035.80762, 46.08785, 92.075073242188-1.2,"cylinder",1.5,255,255,0,200)
setElementInterior(marker, 0)
addEventHandler("onClientMarkerHit",marker,function(plr)
if (plr==localPlayer) then
if getElementData(plr,"player:job") then
toggleControl("sprint",false)
toggleControl("enter_exit",false)
toggleControl("jump",false)
triggerServerEvent("giveObject:buildingjob",plr,plr)
destroyElement(marker)
markern = createMarker(-1824.58569, 1027.90466, 45.23264-1.2,"cylinder",1.5,255,255,0,150)
setElementInterior(markern, 0)
addEventHandler("onClientMarkerHit",markern,function(plr)
if (plr==localPlayer) then
if getElementData(plr,"player:job") then
if not isPedInVehicle(plr) then
triggerServerEvent("destroyElement:buildingjob",plr,plr)
destroyElement(markern)
playerpoints = tonumber(playerpoints) + 1
toggleControl("sprint",true)
toggleControl("enter_exit",true)
toggleControl("jump",true)
startJobEtap(plr)
end
end
end
end)
end
end
end)
end
if getElementData(plr,"player:job:materialy:etap") == 2 then
setElementFrozen(plr,true)
setTimer(function()
setElementInterior(plr,0)
triggerServerEvent("createVehicle:buildingjob",plr,plr)
local rnd = math.random(1,#pointsNEXT)
point = createMarker(pointsNEXT[rnd][1],pointsNEXT[rnd][2],pointsNEXT[rnd][3]-2,"cylinder",4,0,0,255,150)
blip = createBlipAttachedTo(point,12)
addEventHandler("onClientMarkerHit",point,function(plr)
if (plr==localPlayer) then
if getElementData(plr,"player:job") then
if isPedInVehicle(plr) then
outputChatBox("?wietna robota! Za godn? podziwu prac? otrzymujesz wynagrodzenie!",0,255,0)
setElementData(plr,"player:job",false)
setElementData(plr,"player:job:materialy:etap",false)
triggerServerEvent("destroyElement:buildingjob",plr,plr)
triggerServerEvent("destroyVehicle:buildingjob",plr,plr)
endJob(plr)
setElementData(plr,"DM:unlock",true)
local kasa = math.random(200000,225000)
local kasapremium = math.random(225000,250000)
if getElementData(localPlayer,"player:premium") then
givePlayerMoney(kasapremium)
else
givePlayerMoney(kasa)
end
fadeCamera(false)
setTimer(function()
fadeCamera(true)
end,3500,1)
playerpoints = 0
timerrrrr[plr] = setTimer(function()
setElementPosition(plr,-1843.88684, 995.08228, 45.85445)
end,2500,1)
else
endJob(plr)
end
else
endJob(plr)
end
end
end)
end,1000,1)
end
end
end
addEventHandler("onClientVehicleExit",resourceRoot,function(plr,seat)
if plr == localPlayer then
endJob(plr)
setElementData(plr,"player:job",false)
setElementData(plr,"player:job:materialy:etap",false)
triggerServerEvent("destroyElement:buildingjob",plr,plr)
triggerServerEvent("destroyVehicle:buildingjob",plr,plr)
playerpoints = 0
end
end)
addEventHandler("onClientPlayerWasted",root,function()
if source == localPlayer then
endJob(source)
setElementData(source,"player:job",false)
setElementData(source,"player:job:materialy:etap",false)
triggerServerEvent("destroyElement:buildingjob",source,source)
triggerServerEvent("destroyVehicle:buildingjob",source,source)
playerpoints = 0
end
end)
fileDelete("client.lua")
droper24hp, podaj kod admin_client.lua z pliku admin linijka 129....
a tak na powaznie podaj bledy db3 z tego skryptu!!!
Tu co? ci si? kod urwa?, nie napisz? go bo nie wiem co tam by?o, ale pozamyka?em event i instrukcje warunkow?
local vehicles = {
{2568,-1302.5,1044.19,0,0,270},
}
local text = createElement("text")
setElementData(text, "scale", 1)
setElementData(text,"name", "Nielegalna praca\nMarihuana\nWymagania: Brak\nRadzimy uwa?a? na policj? kt?ra raz na jaki? czas si? tutaj kr?ci")
setElementPosition(text,-1843.34863, 993.21570,44.4+1.2)
for _,v in ipairs(vehicles) do
local vehicle = createVehicle(499,v[1],v[2],v[3],v[4],v[5],v[6])
setElementFrozen(vehicle,true)
setVehicleLocked(vehicle,true)
setVehicleVariant(vehicle,2,2)
setElementData(vehicle,"pojazdpracy",true)
setVehicleColor(vehicle,175,118,007,088,114,070)
setElementInterior(vehicle, 0)
end
object = {}
veh = {}
addEvent("giveObject:buildingjob",true)
addEventHandler("giveObject:buildingjob",root,function(plr)
if plr then
object[plr] = createObject(1704,0,0,0,0,0,0)
setElementCollisionsEnabled(object[plr],false)
setElementDoubleSided(object[plr],true)
setObjectScale(object[plr],0.8)
attachElements(object[plr],plr,-0.35,0.6,0,0,0,0,0)
setTimer(setPedAnimation,50,1,plr,"CARRY","crry_prtial",1)
setElementInterior(object[plr], 0)
end
end)
addEvent("destroyElement:buildingjob",true)
addEventHandler("destroyElement:buildingjob",root,function(plr)
if plr then
if object[plr] and isElement(object[plr]) then
destroyElement(object[plr])
end
setPedAnimation(plr,"CARRY","crry_prtial",1,true,false,true,false)
end
end)
addEventHandler("onVehicleStartEnter",resourceRoot,function(plr,seat)
if seat == 0 then
cancelEvent()
end
end)
addEventHandler("onMarkerHit", getRootElement(), function(el,md)
if source == rozpraca then
if getElementType(el) == "vehicle" then return end
if getPedOccupiedVehicle(el) then return end
if getElementData(el, "player:job") then outputChatBox("* Posiadasz rozpocz?t? prac?!",el) return end
outputChatBox("Rozpocz??e? prac? Dilerk?!",el, 255, 255, 255)
setElementData(el, "player:job","Marycha")
triggerClientEvent(el, "marycha", el, md)
toggleControl(el,"enter_exit", false)
elseif source == zakpraca then
if getElementType(el) == "vehicle" then return end
if getPedOccupiedVehicle(el) then return end
end
end)
t1 = {}
t2 = {}
t3 = {}
local pv = {
{-2639.82690, 1438.57495, 7.07637, 0, 0, 0},
{-2630.10278, 1430.96912, 7.07525, 0, 0, 0},
}
addEvent("createVehicle:buildingjob",true)
addEventHandler("createVehicle:buildingjob",root,function(plr)
if plr then
local rnd = math.random(1,#pv)
veh[plr] = createVehicle(499,pv[rnd][1],pv[rnd][2],pv[rnd][3],pv[rnd][4],pv[rnd][5],pv[rnd][6],"Meble")
setElementInterior(veh[plr], 0)
setElementInterior(plr, 0)
setVehicleVariant(veh[plr],2,2)
setVehicleColor(veh[plr],088,114,070,088,114,070)
setVehicleLocked(veh[plr],true)
fadeCamera(plr,false)
warpPedIntoVehicle(plr,veh[plr])
t1[plr] = setTimer(function()
fadeCamera(plr,true)
setElementFrozen(plr,false)
end,2000,1)
outputChatBox("Teraz wystarczy dostarczy? ?adunek! Miejsce zosta?o oznaczone na minimapie!",plr,0,255,0,true)
end
end)
addEvent("destroyVehicle:buildingjob",true)
addEventHandler("destroyVehicle:buildingjob",root,function(plr)
if plr then
if veh[plr] and isElement(veh[plr]) then
t2[plr] = setTimer(function()
destroyElement(veh[plr])
if t2[plr] and isTimer(t2[plr]) then killTimer(t2[plr]) end
end,1000,1)
end
setElementData(plr,"player:job:materialy:etap",false)
setElementData(plr,"player:job",false)
end
end)
addEventHandler("onPlayerQuit",root,function()
if getElementData(source,"login") == getPlayerName(source) then
triggerEvent("destroyElement:buildingjob",source,source)
end
end)
addCommandHandler("plrjob",function(plr,cmd)
if getElementData(plr,"ACL") == "admin" then
setElementData(plr,"player:job",false)
end
end)
function isVehicleEmpty(vehicle)
if not isElement(vehicle) or getElementType(vehicle) ~= "vehicle" then return true end
local passengers = getVehicleMaxPassengers(vehicle)
if type(passengers) == "number" then
for seat = 0, passengers do
if getVehicleOccupant(vehicle,seat) then return false end
end
end
return true
end
setTimer(function()
for _,v in ipairs(getElementsByType("vehicle",resourceRoot)) do
if isVehicleEmpty(v) then
if getElementData(v,"pojazdpracy") == false then
destroyElement(v)
end
end
end
end,15000,0)
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