function barier(plr)
if getElementModel(plr) ~= 280 then return end
local x,y,z = getElementPosition(plr)
local rx,ry,rz = getElementRotation(plr)
local barierka = createObject(2892, x,y,z-0.7)
setElementData(barierka, "isBarierka", true)
setElementRotation(barierka, rx, ry, rz+90)
setElementFrozen(barierka, false)
setElementData(barierka, "isBarierka2", getPlayerName(plr))
end
addCommandHandler("kol",barier )
function barier(plr)
if getElementModel(plr) ~= 280 then return end
for i,v in ipairs(getElementsByType("object", resourceRoot)) do
if not getElementData(v, "isBarierka") then return end
if getElementData(v, "isBarierka2") == getPlayerName(plr) then
destroyElement(v)
end
end
end
addCommandHandler("usb", barier)