function tworzeniePojazdu(model, tablice, k1, k2, k3)
local posX, posY, posZ = getElementPosition(source)
local rotX, rotY, rotZ = getElementRotation(source)
local int = getElementInterior(source)
local handler = mysql:query("INSERT INTO `"..mysql:getNameDB().."`.`vehicles` (`id`, `model`, `x`, `y`, `z`, `rotx`, `roty`, `rotz`, `currx`, `curry`, `currz`, `currrx`, `currry`, `currrz`, `fuel`, `engine`, `locked`, `lights`, `sirens`, `paintjob`, `hp`, `color1`, `color2`, `color3`, `color4`, `plate`, `faction`, `owner`, `job`, `tintedwindows`, `dimension`, `interior`, `currdimension`, `currinterior`, `enginebroke`, `items`, `itemvalues`, `Impounded`, `handbrake`, `safepositionX`, `safepositionY`, `safepositionZ`, `safepositionRZ`, `upgrades`, `wheelStates`, `panelStates`, `doorStates`, `odometer`, `headlights`, `variant1`, `variant2`) VALUES (NULL, '"..model.."', '"..posX.."', '"..posY.."', '"..posZ.."', '"..rotX.."', '"..rotY.."', '"..rotZ.."', '0.000000', '0.000000', '0.000000', '0.000000', '0.000000', '0.000000', '100', '0', '1', '0', '0', '0', '1000', '"..k1..","..k2..","..k3.."', '0', NULL, NULL, '"..tablice.."', '-1', '-1', '-1', '0', '0', '"..int.."', '0', '0', '0', NULL, NULL, '0', '0', NULL, NULL, NULL, NULL, '[ [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] ]', '[ [ 0, 0, 0, 0 ] ]', '[ [ 0, 0, 0, 0, 0, 0, 0 ] ]', '[ [ 0, 0, 0, 0, 0, 0 ] ]', '0', '255,255,255', '255', '255');")
local pobierz = mysql:query("SELECT * FROM `vehicles` WHERE x = '"..posX.."' and y = '"..posY.."' and z = '"..posZ.."'")
local row = mysql:fetch_assoc(pobierz)
local id = row["id"]