Я один оказался самым глазастым
local gate = createObject(10841, 2595.5, -2140.3000488281,6.9000000953674 )
local gatecol = createColCircle ( 2595.5, -2140.3000488281, 25 ) --Co-Ordinates "X" and "Y" and the radius, I use 15 as default.
function openagates(thePlayer)
if getElementModel ( thePlayer ) == 217 then --Will open only if the player is in the male staff skin
moveObject ( gate, 6000, 2618.3000488281, -2140.3000488281, 6.9000000953674 ) --The speed in which 7000 is slow and 2000 is fast to open, Co-Ordinates for the gate to move to.
end
end
addEventHandler( "onColShapeHit", gatecol, openagates )
function closeagates(thePlayer)
if getElementModel( thePlayer ) == 217 then --Will close only if the player is in the male staff skin
moveObject (gate, 6000, 2595.5, -2140.3000488281,6.9000000953674) --The speed in which 7000 is slow and 1000 is fast to open, Co-Ordinates for the gate to close.
end
end
addEventHandler( "onColShapeLeave", gatecol, closeagates )
Вот рабочий код =)
Но в чем ошибка спросите вы?
А я вам отвечу!
moveObject ( gate, 6000, 2618.3000488281, -2140.3000488281, 6.9000000953674, 0, 0, 0 )
в данной строке!
После удаления последних трех аргументов которые отвечают за разворот я добился работоспособности скрипта без ошибок)
Таким образом строчка должна выглядеть так
moveObject ( gate, 6000, 2618.3000488281, -2140.3000488281, 6.9000000953674)
ЗЫ Ко всему прочему в коде одинаковые позиции как при вхождении в колшейп так и при выходе, тоесть ворота некуда не уедут потому что им не сказали куда смещаться!