Witam mam taki problem poniewa? mam kod na sprawdzanie czy gracz ma prawo jazdy (chcia?em wykorzysta? go do prac) ale gdy zaczynam prace jest wysylana jedynie wiadomosc ze nie mam prawka a moge pracowac tu macie kod i b??d z DB3
Kod: BadArgument @'GetElementData[Expected element at argument 1, got nil]
function getVehicleLicense(plr,type)
if getElementData ( plr,"player:license:pj"..type.."" ) ~= 1 then
outputChatBox("* Nie posiadasz prawa jazdy kategorii "..type..", zdaj je w urz?™dzie miasta", plr, 255, 0, 0)
return true
end
local result=exports["sas-db"]:dbGet("SELECT * FROM sas_punish WHERE serial=? AND type=? AND active=1 AND time>NOW()", getPlayerSerial(plr), tostring(type))
if result and #result > 0 then
v=result[1]
outputChatBox("* Posiadasz zawieszone prawo jazdy do "..v.time.." za "..v.reason, plr)
return true
else
exports["sas-db"]:dbSet("DELETE FROM sas_punish WHERE serial=? AND type=? AND active=1 AND time<NOW()", getPlayerSerial(plr), tostring(type))
return false
end
end