السلام عليكم
شباب انا ضبطت كل شي ومو راضي يتحرك
local Object = createObject ( 2669, -714.19921875, 530, 15.89999961853,0,0,67.74169921875 )
local Marker = createMarker ( -716.09997558594, 530.70001220703, 14.60000038147, "cylinder", 1 , 254, 255, 255, 50 )
function OpenObject ( player )
if isElementWithinMarker ( player, Marker ) then
local accName = getAccountName ( getPlayerAccount ( player ) )
if not Open then
moveObject ( Object, 1100, -714.19921875, 530, 40 )
else
moveObject ( Object, 1100, -714.19921875, 530, 15.89999961853 )
end
Open = not Open
end
end
addEventHandler ( "onResourceStart", resourceRoot,
function ( )
for _, v in ipairs ( getElementsByType ( "player" ) ) do
bindKey ( v, "[", "down", OpenObject )
end
end
)
addEventHandler ( "onPlayerJoin", root,
function ( )
bindKey ( source, "[", "down", OpenObject )
end
)
وش الحل