Siema, mam taki problem, doda?em si? do SAPD w mysql i gdy klikam rozpocznij sluzbe pojawia si? w debugscript zebym sprawdzil linijke 42 w s.duty_lua attempt to index local 'result' (a boolean value)
Witam pom?g?by kto? naprawi? ten b??d?
[lua]
c_side:122/attempt to index field '?' (a nil value)
[/lua]
c_side
[lua]
local screenW, screenH = guiGetScreenSize()
local px,py = (screenW/1920),(screenH/1080)
local zoom = 1
local fh = 1920
if screenW < fh then
zoom = math.min(2,fh/screenW)
end
addEventHandler("onClientMarkerHit", marker, function(h)
local _,_,z = getElementPosition(localPlayer)
local _,_,z2 = getElementPosition(source)
if z > z2+1 then return end
if h ~= localPlayer then return end
if isPedInVehicle(localPlayer) then return end
setElementData(localPlayer, "prawko:gui", true)
showCursor(true)
end)
function isMouseIn ( x, y, width, height )
if ( not isCursorShowing( ) ) then
return false
end
local sx, sy = guiGetScreenSize ( )
local cx, cy = getCursorPosition ( )
local cx, cy = ( cx * sx ), ( cy * sy )
if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then
return true
else
return false
end
end
strona = "start"
function gui()
if not getElementData(localPlayer, "prawko:gui") == true then return end
if strona == "start...
Siemaneczko, problemik ze skrypcikiem a dok?adnie [spoiler][img]https://i.imgur.com/2kJTNm4.png[/img]. [/spoiler]
[lua]addCommandHandler("opona", function(_, r, g, b)
local veh = getPedOccupiedVehicle(localPlayer);
if(not veh)then return end;
local tune = getVehicleUpgrades(veh);
for i,v in pairs(tune) do
if(names[v])then
setWheelColor(veh, v, r, g, b);
end;
end;
end);
local vehs = {};
function setWheelColor(veh, id, r, g, b)
if(r and g and b)then
setElementData(veh, "vehicle:wheel", {id, r, g, b});
else
local v = vehs[veh];
if(v)then
engineRemoveShaderFromWorldTexture(v[2], v[3], veh);
addEventHandler("onClientRender", root, function()
for i,v in pairs(getElementsByType("vehicle", true)) do
local wheel = getElementData(v, "vehicle:wheel");
if(not vehs[v] and wheel)then
vehs[v] = {};
function kliki()
-- if getElementData(localPlayer, "praca") ~= "betoniarz" then return end
if isMouseIn(mousePoints[target][1], mousePoints[target][2], mousePoints[target][3], mousePoints[target][4]) then
target = target+1
if target == #mousePoints then
local hajs = math.random(17, 30)
local hajsp = math.random(21, 38)
if getElementData(localPlayer, "player:premium") ~= true then
triggerServerEvent("beton:hajs", localPlayer, hajs)
triggerEvent("onClientAddNotification", el, "Odda?e?/a? paczk?nOtrzymujesz "..hajs.." $", "info")
else
triggerServerEvent("beton:hajs", localPlayer, hajsp)
triggerEvent("onClientAddNotification", localPlayer, "Odda?e?/a? paczk?nOtrzymujesz "..hajsp.." $ [PREMIUM]", "info")
end
target = 0
setElementData(localPlayer, "beton:zakonczono", true)
showCursor(false)
stworzMarker()
addEventHandler("onClientMarkerHit", mcel, onRandom)
end
return
end
end
bind...
mam problem z kodem 27 linia local dim=split(getnajwyzszydim.intdim_wnetrza,",")
[lua]addCommandHandler("adddomek2",
function(plr,cmd,cena,miejsca_parkingowe,id_interioru,id_garazu,pozycja_wyjscia)
if not iswlasciciel(plr) and (getElementData(plr,"dbid")~=1) then
return
end
if not cena or not tonumber(cena) or not miejsca_parkingowe or not id_interioru or not id_garazu then
exports["komunikaty"]:komunikat("/adddomek [cena] [miejsca_parkingowe] [id_interioru <0-23>] [id_garazu] [x,y,z_wyjscia]", plr)
return
end
local z_i=nil
for i,v in ipairs(inside) do
if (tonumber(id_interioru)==i) then
z_i=v
end
end
if not z_i then
exports["komunikaty"]:komunikat("Nieprawid?owy identyfikator interioru.", plr)
return
end
local pozycja=string.format("%s,%s,%s", z_i.poz[1], z_i.poz[2], z_i.poz[3])
if not pozycja_wyjscia then
local px,py,pz=getElementPosition(plr)
pozycja_wyjscia=string.format("%s,%s,%s", px,py,pz)
end
local pozycja_markera=string.format("%s,%s,%s", z_i.marker_wejscie[1], z_i.marker_wejscie[2], z_i.marker_wejscie[3])
local getnajwyzszydim=exports.DB:pobierzWyniki("SELECT intdim_wnetrza FROM domy ORDER BY id DESC LIMIT 1")
local dim=split(getnajwyzszydim.intdim_wnetrza,",")
dim=tonumber(dim[2])
dim=dim+1
addDomek(plr,cena,miejsca_parkingowe,pozycja,z_i....