Hit/\/\an Posted June 28, 2015 Share Posted June 28, 2015 سلام عليكم ورحمة الله وبركاته رمضان كريم !, انا بس بدي طلب صغير لرمضان الي يكتم اغاني ريس يعني OnPlayerJoin - اوتمات ينكتم الاغاني او ينكبس حرف M علشان ريس كذا لازم تضغط عشان تكتم واذا بنفع احط مثلا راديو في الي يكون اغاني انا احطها وتكون بسيرفر اغاني رمضانية وحلوة مو ***** وشكرا ورمضان كريم Link to comment
Mr.R Posted June 28, 2015 Share Posted June 28, 2015 : عشان تكتم الصوت من زر في الكيبورد تحتاج الفنكشنات ذي bindKey stopSound واذا تبيه اول مايدخل تشتغل انشوده Event : "onClientResourceStart" playSound ابري ذمتي اذا حطيت موسيقى او اغاني Link to comment
TAPL Posted June 28, 2015 Share Posted June 28, 2015 setSoundVolume او setSoundPaused Link to comment
Professional Posted June 28, 2015 Share Posted June 28, 2015 (edited) لم يتم التجربه bindKey("m", "down", --- bind key m function () if(isSoundPaused(theSound)) then setSoundPaused(theSound, false) -- stop sound outputChatBox ( "The Sound Is Stop !!", 255, 255, 255, true ) elseif setSoundPaused(theSound, true) -- run sound outputChatBox ( "The Sound is run !!", 255, 255, 255, true ) end) --- end function and Closing arc Edited June 28, 2015 by Guest Link to comment
TAPL Posted June 28, 2015 Share Posted June 28, 2015 لم يتم التجربه bindKey("m", "down", --- bind key m function () setSoundPaused(theSound, false) -- stop sound outputChatBox ( "The Sound Is Stop !!", 255, 255, 255, true ) else setSoundPaused(theSound, true) -- run sound outputChatBox ( "The Sound is run !!", 255, 255, 255, true ) end) --- end function and Closing arc if بدون else حاط Link to comment
Hit/\/\an Posted June 28, 2015 Author Share Posted June 28, 2015 لا ذا الخيار في كل ماب بس انا اكتمه علاخر بدون مايتشتغل الاغاني انا بحطها بعدين بس مابي اغاني علاخر Link to comment
TAPL Posted June 28, 2015 Share Posted June 28, 2015 أنت فهمت غلط ما يصير تحطها بدون ما يكون فيه شرط else انا اقصد ان ال if xxxxxxxx then -- تحقق الشرط else -- لم يتحقق الشرط end -- إغلاق ما يصير تحطها بدون ما يكون فيه شرط elseif و حتى ال if xxxxxxxx then -- الشرط الأول -- تحقق الشرط الأول elseif xxxxxxx then -- لم يتحقق الشرط الأول، وضع شرط ثاني -- تحقق الشرط الثاني end -- إغلاق else + elseif و ممكن تحط if xxxxxxxx then -- الشرط الأول -- تحقق الشرط الأول elseif xxxxxxx then -- لم يتحقق الشرط الأول، وضع شرط ثاني -- تحقق الشرط الثاني else -- لم يتحقق الشرط الأول و لم يتحقق الشرط الثاني end -- إغلاق Link to comment
Professional Posted June 28, 2015 Share Posted June 28, 2015 لم يتم تجربه ة function sound() setSoundPaused(theSound, false) end -- end function addEventHandler("onClientPlayerJoin", getRootElement(), sound) Link to comment
Professional Posted June 28, 2015 Share Posted June 28, 2015 أنت فهمت غلطما يصير تحطها بدون ما يكون فيه شرط else انا اقصد ان ال if xxxxxxxx then -- تحقق الشرط else -- لم يتحقق الشرط end -- إغلاق ما يصير تحطها بدون ما يكون فيه شرط elseif و حتى ال if xxxxxxxx then -- الشرط الأول -- تحقق الشرط الأول elseif xxxxxxx then -- لم يتحقق الشرط الأول، وضع شرط ثاني -- تحقق الشرط الثاني end -- إغلاق else + elseif و ممكن تحط if xxxxxxxx then -- الشرط الأول -- تحقق الشرط الأول elseif xxxxxxx then -- لم يتحقق الشرط الأول، وضع شرط ثاني -- تحقق الشرط الثاني else -- لم يتحقق الشرط الأول و لم يتحقق الشرط الثاني end -- إغلاق اهاأأ شكر ولله الحين فهمت يا تابل يعني لازم نحط الشرط الاول ول elseif هي عشان نختصر الشرط الثاني يعني عشان ما نعيد نفس الجمله ♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥ Link to comment
Professional Posted June 28, 2015 Share Posted June 28, 2015 لو تبي ان الاعب في كل ماب امتا بده يشغل الصوت ويطفيبه تم تعديل Link to comment
Hit/\/\an Posted June 28, 2015 Author Share Posted June 28, 2015 function sound() setSoundPaused(theSound, false) end -- end function addEventHandler("onClientPlayerJoin", getRootElement(), sound) الحين ذي تطفي الاغاني ؟؟ مايقدر يشغلها ,؟ ؟ Link to comment
Hit/\/\an Posted June 28, 2015 Author Share Posted June 28, 2015 function startMusic() setRadioChannel(0) song = playSound("MyMusic.mp3",true) outputChatBox("Toggle music on/off using M") outputChatBox("Script made by ********") end function makeRadioStayOff() setRadioChannel(0) cancelEvent() end function toggleSong() if not songOff then setSoundVolume(song,0) songOff = true removeEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff) else setSoundVolume(song,1) songOff = false setRadioChannel(0) addEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff) end end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),startMusic) addEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff) addEventHandler("onClientPlayerVehicleEnter",getRootElement(),makeRadioStayOff) addCommandHandler("MyMusic",toggleSong) bindKey("m","down","MyMusic") الكود ذا كيف اقدر اضيف اكثر من اغنية ؟؟ Link to comment
Professional Posted June 28, 2015 Share Posted June 28, 2015 يب لان يقولك اول ما لاعب يدخل كلينت يعني لاعب وحدو الصوت يختفي Link to comment
Professional Posted June 28, 2015 Share Posted June 28, 2015 function startMusic() setRadioChannel(0) song = playSound("MyMusic.mp3",true) outputChatBox("Toggle music on/off using M") outputChatBox("Script made by ********") end function makeRadioStayOff() setRadioChannel(0) cancelEvent() end function toggleSong() if not songOff then setSoundVolume(song,0) songOff = true removeEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff) else setSoundVolume(song,1) songOff = false setRadioChannel(0) addEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff) end end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),startMusic) addEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff) addEventHandler("onClientPlayerVehicleEnter",getRootElement(),makeRadioStayOff) addCommandHandler("MyMusic",toggleSong) bindKey("m","down","MyMusic") الكود ذا كيف اقدر اضيف اكثر من اغنية ؟؟ من مين سارق هل كود واصلن هل كود ما له علاقه بل موضوع ذا عرفت انك اخذه من ذا outputChatBox("Script made by ********") ماحي اسم صاحب السكربت ..... Link to comment
Professional Posted June 28, 2015 Share Posted June 28, 2015 الحين تبي تضيف اغاني ولا تبي اول ما لاعب يدخل ما يكون فيه ولا صوت بسيرفر Link to comment
Hit/\/\an Posted June 28, 2015 Author Share Posted June 28, 2015 سارقه ؟؟ الله ياسامحك بس انا ماحبيت احط اسمه https://community.multitheftauto.com/in ... ls&id=7143 ان بعض الظن اثم ! Link to comment
Professional Posted June 28, 2015 Share Posted June 28, 2015 لو تبي ان بس الاعب يدخل وما عاد يكون عنده صوت استخدم اخر كود عطيتك اياه واذا تبي لما الاعب يضغط حرف ة او ام بل انجليزي استعمل اول كود عطيتك ياه ولما تخلص اطفي المود لحين ما تبيه وانا بعد شوي ببرمج وبصمم مود كذا Link to comment
Hit/\/\an Posted June 28, 2015 Author Share Posted June 28, 2015 اول شي شكرا كثير على الكودد بس انا عشان رمضان عايز انا احط الاغاني بنفسيي مو ذي الاغاني يعني اغاني رمضان كل مرة انا اغير مثل راديو ففس Link to comment
Professional Posted June 28, 2015 Share Posted June 28, 2015 لم يتم التجربه مالي خبره بل جداول كثير يعني معرف لو فيه خطا فيه local sound = { [ .mp3 ] = true ------- اسم الاغنيه [ .mp3 ] = true ------- اسم الاغنيه [ .mp3 ] = true ------- اسم الاغنيه [ .mp3 ] = true ------- اسم الاغنيه [ .mp3 ] = true ------- اسم الاغنيه } for i, v in ipairs ( sound ) do --- عشان يوصل لجدول شو وظيفته local sound = playSound ( v[1], v[2] )--- عشان يوصل لجدول شو وظيفته end -- اند do addEventHandler("onClientResourceStart", resourceRoot, -- اول ما تشغل المود function() -- فنكش setSoundVolume (sound, 1.0 ) -- يعطي صوت الاغنيه قوي end) -- اند فنكش واغلاق قوس ------------------------------------------------------------- Link to comment
Mr.R Posted June 28, 2015 Share Posted June 28, 2015 (edited) function sound() setSoundPaused(theSound, false) end -- end function addEventHandler("onClientPlayerJoin", getRootElement(), sound) الحين ذي تطفي الاغاني ؟؟ مايقدر يشغلها ,؟ ؟ هذا الكود الصحيح للإيقاف المؤقت جرب كذا bindKey ( "M", "down", function ( theSound ) if ( isSoundPaused ( theSound ) ) then setSoundPaused ( theSound, false ) -- إيقاف مؤقت للصوت else setSoundPaused ( theSound, true ) -- تشغيل الصوت end end ) Edited June 28, 2015 by Guest Link to comment
Professional Posted June 28, 2015 Share Posted June 28, 2015 لا لا هو يبي بدال اغاني الريس الي فيه المابات يبي اغنيه بدالها لرمضان بس كذا بدو يفوت على ملف الكلينت لريس قصدي كلينت للماب ويمسح فنكشن اسمه playsound واعتقد 80% مابات ريس مشفره Link to comment
Mr.R Posted June 28, 2015 Share Posted June 28, 2015 لا لا هو يبي بدال اغاني الريس الي فيه المابات يبي اغنيه بدالها لرمضانبس كذا بدو يفوت على ملف الكلينت لريس قصدي كلينت للماب ويمسح فنكشن اسمه playsound واعتقد 80% مابات ريس مشفره حبيبي انا فهمت قصده الحين وعدلت الكود , رديت عليه بخصوص الإيقاف المؤقت ^^ 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