addCommandHandler("respawnauta",function(plr,cmd,id,ccar)
if getAdmin(plr,4) then
local veh = getPedOccupiedVehicle(plr)
if not id or not tonumber(id) then
outputChatBox("MS♛ • Podaj id pojazdu!", plr, 255, 0, 0)
return
end
if not veh then
outputChatBox("MS♛ • Musisz by? w pojed?dzie.", plr, 255,0,0)
return
end
local id = getElementData(veh, "vehicle:id")
local x,y,z=getElementPosition(veh)
local rx,ry,rz=getElementRotation(veh)
local aktualna_pozycja={x,y,z,rx,ry,rz}
exports["pystories-vehicles"]:onSaveVehicle(veh)
destroyElement(veh)
exports["pystories-db"]:dbSet("UPDATE pystories_vehicles SET parking=1,tp_to_parking=? WHERE id=?","Respawn RCON", id)
setTimer(function(gracz, id, aktualna_pozycja)
local x = exports["pystories-vehicles"]:onRespawnVehicles(_,tonumber(id), aktualna_pozycja)
warpPlayerIntoVehicle ( plr, x )
end, 50, 1, client, id, aktualna_pozycja)
end
end)