Emgawe.117 Posted April 20, 2016 Share Posted April 20, 2016 الـسلام عليكم ابي كود اذا ظغت زر يظهر صوت" فجأة عشان يخوف اللاعب" Link to comment
Me[Z]oO Posted April 20, 2016 Share Posted April 20, 2016 addEventHander('onClientGUIClick',root, function() if source == ButtonName then local sound = playSound("Music.mp3") setSoundVolume(sound, 0.5) end end) Link to comment
#|_oskar_|# Posted April 20, 2016 Share Posted April 20, 2016 كدا رح يكرر الصوت لو ضغط ع الزر اكثر من مره Link to comment
Me[Z]oO Posted April 20, 2016 Share Posted April 20, 2016 كدا رح يكرر الصوت لو ضغط ع الزر اكثر من مره addEventHander('onClientGUIClick',root, function() if source == ButtonName then local sound = playSound("Music.mp3") setSoundVolume(sound, 0.5) guiSetEnabled(ButtonName,true) setTimer(function() guiSetEnabled(ButtonName,false) end,10000,1) end end) Link to comment
Abdul KariM Posted April 20, 2016 Share Posted April 20, 2016 if isElement ( sound ) then return end -- or if isElement ( sound ) then destroyElement ( sound ) end Link to comment
#|_oskar_|# Posted April 20, 2016 Share Posted April 20, 2016 احسن من التايمر addEventHandler ("onClientGUIClick",ButtonName,function () local Sound = playSound("sound.mp3") guiSetEnabled(ButtonName,false) end,false) addEventHandler ( "onClientSoundStopped", resourceRoot,function (oskar) if ( oskar == "finished" ) then guiSetEnabled(ButtonName,true) end end) Link to comment
Emgawe.117 Posted April 21, 2016 Author Share Posted April 21, 2016 احسن من التايمر addEventHandler ("onClientGUIClick",ButtonName,function () local Sound = playSound("sound.mp3") guiSetEnabled(ButtonName,false) end,false) addEventHandler ( "onClientSoundStopped", resourceRoot,function (oskar) if ( oskar == "finished" ) then guiSetEnabled(ButtonName,true) end end) أبيه كل مايظغط F2 يظهر صوت مو كل مايضغط علا بوتون Link to comment
Abdul KariM Posted April 21, 2016 Share Posted April 21, 2016 bindKey حاول فيها ترا سهل < Link to comment
Ahmed Ly Posted April 21, 2016 Share Posted April 21, 2016 function key () playSound("sound.mp3") end bindKey("F2", "down", key) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now