result=0
addEventHandler("onClientMarkerHit", m1, function(el)
if el ~= localPlayer then return end
if getPedOccupiedVehicle(el) then return end
triggerServerEvent("*****",resourceRoot)
if result==1 then
dalej kod
addEvent("inty",true)
addEventHandler("inty",resourceRoot,function(srv)
result=tonumber(srv)
end)
SSIDE
addEvent("*****",true)
addEventHandler("*****",resourceRoot,function()
local x=exports["pystories-db"]:dbGet("SELECT garaz FROM pystories_users WHERE id=?",getElementData(client, "player:sid"))
triggerClientEvent(client,"inty",resourceRoot,x)
end)
result=0
addEventHandler("onClientMarkerHit", m1, function(el)
if el ~= localPlayer then return end
if getPedOccupiedVehicle(el) then return end
triggerServerEvent("*****",resourceRoot)
end)
addEvent("inty",true)
addEventHandler("inty",resourceRoot,function(srv)
result = #srv -- je?li chcesz liczb? wynik?w to pobierasz j? przez #, tonumber zwr?ci Ci false
if result == 1 then
dalej kod
end
end)
Za wcze?nie robi?e? sprawdzanie warto?ci zmiennej "result" gdy? wtedy wynosila ona nadal warto?? ustalon? na pocz?tku czyli 0
edit: napisa?em troche niezrozumiale CHODZI MI O LICZBE nie ilosc wyniku zrobilem tak:
da?em
result=srv i teraz to wog?le nic sie nie dzieje ani 1 tryb ani drugi bo wczesniej cz??? po else si? dzia?a
[ Dodano: 2020-10-10, 18:33 ]
edit: jest tak samo dzieje sie to co jest po else od if result==1 then a kiedy pr?buj? zrobic outputChatBox(" "..result.." ") aby sie dowiedziec co jest resultem to
attempt to concatenate global 'result' (a table value) w DB3
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