تم تعديل الكود وشغال 100% ء ,#
addEvent ( "ee", true )
addEventHandler ( "ee", root,
function ( )
sound = playSound("abu1.mp3",false)
end
)
addEvent ( "gg", true )
addEventHandler ( "gg", root,
function ( )
stopSound( sound )
end
)
EDITED#
SEVER SIDE ---
function createTheGata ()
myGate2 = createObject ( 980, 489.5, -2499.1000976563, 3.0999999046326, 0, 0, 90 )
end
addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createTheGata )
function openMyGata ( playerSource )
moveObject ( myGate2, 1500, 489.5, -2499.1000976563, -3.0999999046326, 0, 0, 0 )
exports['topbarchat']:sendClientMessage ( "تم فتح البوابة ", root, 255, 255, 255, true )
triggerClientEvent("ee",playerSource)
end
addCommandHandler("O",openMyGata)
function movingMyGataBack ( playerSource )
moveObject ( myGate2, 1500, 489.5, -2499.1000976563, 3.0999999046326, 0, 0, 0 )
exports['topbarchat']:sendClientMessage ( "تم إغلاق البوابة ", root, 255, 255, 255, true )
triggerClientEvent("gg",playerSource)
end
addCommandHandler("C",movingMyGataBack)