local function getVehicle(id)
if id then
id=tonumber(id)
for _,v in ipairs(getElementsByType("vehicle"))do
if getElementData(v,"car_id") then
if getElementData(v,"car_id")==id then
return v
end
end
end
end
return false
end
addCommandHandler("warp",function(plr,cmd,id)
if id then
id=tonumber(id)
local veh=getVehicle(id)
if veh then
local x,y,z=getElementPosition(plr)
local int=getElementInterior(plr)
local dim=getElementDimension(plr)
setElementPosition(veh,x,y,z)
setElementPosition(plr,x,y,z+2)
setElementDimension(veh,dim)
setElementInterior(veh,int)
outputChatBox("Przenios?e? do Siebie "..getVehicleName(veh).." ( ID : "..getElementData(veh,"car_id").." )",plr,255,255,255)
end
end
end)