ivor Posted March 1, 2016 Share Posted March 1, 2016 (edited) السلام عليكم ورحمة الله وبركاتةة ابي كود وهوا عند الضغط علي زر GUI او DX يطلع صوت وكذا وشكرآ Edited March 1, 2016 by Guest Link to comment
7up2016 Posted March 1, 2016 Share Posted March 1, 2016 (edited) btnPlaySound = guiCreateButton( 0.7, 0.1, 0.2, 0.1, "PlaySound!", true ) addEventHandler ( "onClientGUIClick", btnPlaySound, function() local sound = playSound("soundfilename.mp3") end) Edited March 1, 2016 by Guest Link to comment
ivor Posted March 1, 2016 Author Share Posted March 1, 2016 playSound حق المقطع الصوتي الى بالمود صح ؟ Link to comment
7up2016 Posted March 1, 2016 Share Posted March 1, 2016 تحط الصوت اللي تبيه في ملف اللعبة وتضيفه في الميتا وراح يشتغل Link to comment
ivor Posted March 1, 2016 Author Share Posted March 1, 2016 ماظبطت صارت كل ما اشغل او اسوي ريستارت للمود تظخر Link to comment
ivor Posted March 1, 2016 Author Share Posted March 1, 2016 تفضل هاد الاكواد الخاصة بالزر الى يضغط عليه اللاعب Create_Group_Label = guiCreateLabel(10, 22, 217, 16, "Create a Group:", false, Groups_Window) guiLabelSetHorizontalAlign(Create_Group_Label, "right", false) guiLabelSetVerticalAlign(Create_Group_Label, "center") Create_Group_Edit = guiCreateEdit(9, 48, 220, 35, "", false, Groups_Window) Create_Group_Button = guiCreateButton(231, 48, 132, 35, "Create Group", false, Groups_Window) guiSetFont(Create_Group_Button, "default-bold-small") guiSetProperty(Create_Group_Button, "NormalTextColour", "FF00FF00") baseSpawnChk = guiCreateCheckBox(250, 95, 112, 25, "Spawn in Base", false, false, Groups_Window) Name_Group_Label = guiCreateLabel(10, 105, 185, 15, "Group Name: false", false, Groups_Window) guiSetFont(Name_Group_Label, "default-bold-small") Members_Group_Button = guiCreateButton(10, 126, 210, 30, "View My Group Members", false, Groups_Window) addEvent("onClientGUIClick",true) addEventHandler("onClientGUIClick",root) playSound3D("click.mp3") guiSetFont(Members_Group_Button, "default-bold-small") guiSetProperty(Members_Group_Button, "NormalTextColour", "FF0000FF") Leave_Group_Button = guiCreateButton(250, 121, 111, 40, "Leave Group", false, Groups_Window) guiSetFont(Leave_Group_Button, "default-bold-small") guiSetProperty(Leave_Group_Button, "NormalTextColour", "FFFF0000") Link to comment
7up2016 Posted March 1, 2016 Share Posted March 1, 2016 تفضل هاد الاكواد الخاصة بالزر الى يضغط عليه اللاعب Create_Group_Label = guiCreateLabel(10, 22, 217, 16, "Create a Group:", false, Groups_Window) guiLabelSetHorizontalAlign(Create_Group_Label, "right", false) guiLabelSetVerticalAlign(Create_Group_Label, "center") Create_Group_Edit = guiCreateEdit(9, 48, 220, 35, "", false, Groups_Window) Create_Group_Button = guiCreateButton(231, 48, 132, 35, "Create Group", false, Groups_Window) guiSetFont(Create_Group_Button, "default-bold-small") guiSetProperty(Create_Group_Button, "NormalTextColour", "FF00FF00") baseSpawnChk = guiCreateCheckBox(250, 95, 112, 25, "Spawn in Base", false, false, Groups_Window) Name_Group_Label = guiCreateLabel(10, 105, 185, 15, "Group Name: false", false, Groups_Window) guiSetFont(Name_Group_Label, "default-bold-small") Members_Group_Button = guiCreateButton(10, 126, 210, 30, "View My Group Members", false, Groups_Window) addEvent("onClientGUIClick",true) addEventHandler("onClientGUIClick",root) playSound3D("click.mp3") guiSetFont(Members_Group_Button, "default-bold-small") guiSetProperty(Members_Group_Button, "NormalTextColour", "FF0000FF") Leave_Group_Button = guiCreateButton(250, 121, 111, 40, "Leave Group", false, Groups_Window) guiSetFont(Leave_Group_Button, "default-bold-small") guiSetProperty(Leave_Group_Button, "NormalTextColour", "FFFF0000") Create_Group_Label = guiCreateLabel(10, 22, 217, 16, "Create a Group:", false, Groups_Window) guiLabelSetHorizontalAlign(Create_Group_Label, "right", false) guiLabelSetVerticalAlign(Create_Group_Label, "center") Create_Group_Edit = guiCreateEdit(9, 48, 220, 35, "", false, Groups_Window) Create_Group_Button = guiCreateButton(231, 48, 132, 35, "Create Group", false, Groups_Window) guiSetFont(Create_Group_Button, "default-bold-small") guiSetProperty(Create_Group_Button, "NormalTextColour", "FF00FF00") baseSpawnChk = guiCreateCheckBox(250, 95, 112, 25, "Spawn in Base", false, false, Groups_Window) Name_Group_Label = guiCreateLabel(10, 105, 185, 15, "Group Name: false", false, Groups_Window) guiSetFont(Name_Group_Label, "default-bold-small") Members_Group_Button = guiCreateButton(10, 126, 210, 30, "View My Group Members", false, Groups_Window) addEventHandler("onClientGUIClick",root, function() if source == Members_Group_Button then -- اخترت لك هالزر وانت غيره مثل ما تبي playSound("click.mp3") end end) --[[ اذا كنت تبي الصوت يطلع مع كل الازرار addEventHandler("onClientGUIClick",root, function() playSound("click.mp3") end)]] guiSetFont(Members_Group_Button, "default-bold-small") guiSetProperty(Members_Group_Button, "NormalTextColour", "FF0000FF") Leave_Group_Button = guiCreateButton(250, 121, 111, 40, "Leave Group", false, Groups_Window) guiSetFont(Leave_Group_Button, "default-bold-small") guiSetProperty(Leave_Group_Button, "NormalTextColour", "FFFF0000") Link to comment
ivor Posted March 1, 2016 Author Share Posted March 1, 2016 تفضل هاد الاكواد الخاصة بالزر الى يضغط عليه اللاعب Create_Group_Label = guiCreateLabel(10, 22, 217, 16, "Create a Group:", false, Groups_Window) guiLabelSetHorizontalAlign(Create_Group_Label, "right", false) guiLabelSetVerticalAlign(Create_Group_Label, "center") Create_Group_Edit = guiCreateEdit(9, 48, 220, 35, "", false, Groups_Window) Create_Group_Button = guiCreateButton(231, 48, 132, 35, "Create Group", false, Groups_Window) guiSetFont(Create_Group_Button, "default-bold-small") guiSetProperty(Create_Group_Button, "NormalTextColour", "FF00FF00") baseSpawnChk = guiCreateCheckBox(250, 95, 112, 25, "Spawn in Base", false, false, Groups_Window) Name_Group_Label = guiCreateLabel(10, 105, 185, 15, "Group Name: false", false, Groups_Window) guiSetFont(Name_Group_Label, "default-bold-small") Members_Group_Button = guiCreateButton(10, 126, 210, 30, "View My Group Members", false, Groups_Window) addEvent("onClientGUIClick",true) addEventHandler("onClientGUIClick",root) playSound3D("click.mp3") guiSetFont(Members_Group_Button, "default-bold-small") guiSetProperty(Members_Group_Button, "NormalTextColour", "FF0000FF") Leave_Group_Button = guiCreateButton(250, 121, 111, 40, "Leave Group", false, Groups_Window) guiSetFont(Leave_Group_Button, "default-bold-small") guiSetProperty(Leave_Group_Button, "NormalTextColour", "FFFF0000") Create_Group_Label = guiCreateLabel(10, 22, 217, 16, "Create a Group:", false, Groups_Window) guiLabelSetHorizontalAlign(Create_Group_Label, "right", false) guiLabelSetVerticalAlign(Create_Group_Label, "center") Create_Group_Edit = guiCreateEdit(9, 48, 220, 35, "", false, Groups_Window) Create_Group_Button = guiCreateButton(231, 48, 132, 35, "Create Group", false, Groups_Window) guiSetFont(Create_Group_Button, "default-bold-small") guiSetProperty(Create_Group_Button, "NormalTextColour", "FF00FF00") baseSpawnChk = guiCreateCheckBox(250, 95, 112, 25, "Spawn in Base", false, false, Groups_Window) Name_Group_Label = guiCreateLabel(10, 105, 185, 15, "Group Name: false", false, Groups_Window) guiSetFont(Name_Group_Label, "default-bold-small") Members_Group_Button = guiCreateButton(10, 126, 210, 30, "View My Group Members", false, Groups_Window) addEventHandler("onClientGUIClick",root, function() if source == Members_Group_Button then -- اخترت لك هالزر وانت غيره مثل ما تبي playSound("click.mp3") end end) --[[ اذا كنت تبي الصوت يطلع مع كل الازرار addEventHandler("onClientGUIClick",root, function() playSound("click.mp3") end)]] guiSetFont(Members_Group_Button, "default-bold-small") guiSetProperty(Members_Group_Button, "NormalTextColour", "FF0000FF") Leave_Group_Button = guiCreateButton(250, 121, 111, 40, "Leave Group", false, Groups_Window) guiSetFont(Leave_Group_Button, "default-bold-small") guiSetProperty(Leave_Group_Button, "NormalTextColour", "FFFF0000") قسم بالله انك كفو تمت الافادة Link to comment
Abdul KariM Posted March 1, 2016 Share Posted March 1, 2016 بالنسبة للدي اكس onClientClick isMouseInPosition -- Useful Functions playSoundFrontEnd او playSound Link to comment
7up2016 Posted March 1, 2016 Share Posted March 1, 2016 تفضل هاد الاكواد الخاصة بالزر الى يضغط عليه اللاعب Create_Group_Label = guiCreateLabel(10, 22, 217, 16, "Create a Group:", false, Groups_Window) guiLabelSetHorizontalAlign(Create_Group_Label, "right", false) guiLabelSetVerticalAlign(Create_Group_Label, "center") Create_Group_Edit = guiCreateEdit(9, 48, 220, 35, "", false, Groups_Window) Create_Group_Button = guiCreateButton(231, 48, 132, 35, "Create Group", false, Groups_Window) guiSetFont(Create_Group_Button, "default-bold-small") guiSetProperty(Create_Group_Button, "NormalTextColour", "FF00FF00") baseSpawnChk = guiCreateCheckBox(250, 95, 112, 25, "Spawn in Base", false, false, Groups_Window) Name_Group_Label = guiCreateLabel(10, 105, 185, 15, "Group Name: false", false, Groups_Window) guiSetFont(Name_Group_Label, "default-bold-small") Members_Group_Button = guiCreateButton(10, 126, 210, 30, "View My Group Members", false, Groups_Window) addEvent("onClientGUIClick",true) addEventHandler("onClientGUIClick",root) playSound3D("click.mp3") guiSetFont(Members_Group_Button, "default-bold-small") guiSetProperty(Members_Group_Button, "NormalTextColour", "FF0000FF") Leave_Group_Button = guiCreateButton(250, 121, 111, 40, "Leave Group", false, Groups_Window) guiSetFont(Leave_Group_Button, "default-bold-small") guiSetProperty(Leave_Group_Button, "NormalTextColour", "FFFF0000") Create_Group_Label = guiCreateLabel(10, 22, 217, 16, "Create a Group:", false, Groups_Window) guiLabelSetHorizontalAlign(Create_Group_Label, "right", false) guiLabelSetVerticalAlign(Create_Group_Label, "center") Create_Group_Edit = guiCreateEdit(9, 48, 220, 35, "", false, Groups_Window) Create_Group_Button = guiCreateButton(231, 48, 132, 35, "Create Group", false, Groups_Window) guiSetFont(Create_Group_Button, "default-bold-small") guiSetProperty(Create_Group_Button, "NormalTextColour", "FF00FF00") baseSpawnChk = guiCreateCheckBox(250, 95, 112, 25, "Spawn in Base", false, false, Groups_Window) Name_Group_Label = guiCreateLabel(10, 105, 185, 15, "Group Name: false", false, Groups_Window) guiSetFont(Name_Group_Label, "default-bold-small") Members_Group_Button = guiCreateButton(10, 126, 210, 30, "View My Group Members", false, Groups_Window) addEventHandler("onClientGUIClick",root, function() if source == Members_Group_Button then -- اخترت لك هالزر وانت غيره مثل ما تبي playSound("click.mp3") end end) --[[ اذا كنت تبي الصوت يطلع مع كل الازرار addEventHandler("onClientGUIClick",root, function() playSound("click.mp3") end)]] guiSetFont(Members_Group_Button, "default-bold-small") guiSetProperty(Members_Group_Button, "NormalTextColour", "FF0000FF") Leave_Group_Button = guiCreateButton(250, 121, 111, 40, "Leave Group", false, Groups_Window) guiSetFont(Leave_Group_Button, "default-bold-small") guiSetProperty(Leave_Group_Button, "NormalTextColour", "FFFF0000") قسم بالله انك كفو تمت الافادة كفوك + بالتوفيق Link to comment
ivor Posted March 1, 2016 Author Share Posted March 1, 2016 في مشكلة @_@ ان الصوت بيظهر لجميع المودات الاخري اف1 اي مود اخر اضغط اي زر يظهر الصوت الي بالمود Link to comment
Abdul KariM Posted March 1, 2016 Share Posted March 1, 2016 (edited) في مشكلة @_@ ان الصوت بيظهر لجميع المودات الاخري اف1 اي مود اخر اضغط اي زر يظهر الصوت الي بالمود addEventHandler("onClientGUIClick",root, function() playSound("click.mp3") end) اذا انت ضايفه راح يشتغل الكود على كل الازرار احذفه Edited March 1, 2016 by Guest Link to comment
ivor Posted March 1, 2016 Author Share Posted March 1, 2016 اها خلاص اتأكدت اني ضايفة ض تم التعديل و شغال تمام موفق للجميع 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