addEventHandler("onVehicleEnter", getRootElement(), function(plr,seat,jacked)
if seat ~= 0 then return end
if getElementData(source, "vehicle:id") and getElementData(source, "vehicle:spawn") then
local mk2 = exports['pystories-db']:dbGet("SELECT * FROM pystories_vehicles WHERE id=? AND mk2=?",getElementData(source, "vehicle:id"), "1")
local mk1 = exports['pystories-db']:dbGet("SELECT * FROM pystories_vehicles WHERE id=? AND mk1=?",getElementData(source, "vehicle:id"), "1")
local rh = exports['pystories-db']:dbGet("SELECT * FROM pystories_vehicles WHERE id=? AND rh=?",getElementData(source, "vehicle:id"), "1")
local np = exports['pystories-db']:dbGet("SELECT * FROM pystories_vehicles WHERE id=? AND naped=?",getElementData(source, "vehicle:id"), "1")
if #mk1 > 1 then outputChatBox("
Pomy?lnie zaprogramowano MK1",plr,255,255,255) end
if #mk2 > 1 then outputChatBox("
Pomy?lnie zaprogramowano MK2",plr,255,255,255) end
if #rh > 1 then outputChatBox("
Pomy?lnie zaprogramowano RH1",plr,255,255,255) end
if #np > 1 then outputChatBox("
Pomy?lnie zaprogramowano Nap?d 4x4",plr,255,255,255) end
end
end)