Jump to content

طلب كود


Recommended Posts

Posted

السلام عليكم ورحمة الله وبركاته

ام بعد

انا سويت لوحة وفيه اديت بوكس واحد

وزر واحد

الاديت بوكس تحط رابط وتضغط على الزر وتشتغل انشوده

فابغا الاكواد

1- يوم احط الرابط بتاع الانشود

2- يوم اضغط الزر تشتغل الانشوده

Posted
event :  
' onClientGUIClick ' 
  
sound = guiGetText(edit) 
playSound(text) 
  
  

اهم شيء راح تحتاجه

# اعتزال هذه الفترة | المؤسسة العربية تعود قريباً .

# اعتزال هذه الفترة | المؤسسة العربية تعود قريباً .

# اعتزال هذه الفترة | المؤسسة العربية تعود قريباً .

# اعتزال هذه الفترة | المؤسسة العربية تعود قريباً .

# اعتزال هذه الفترة | المؤسسة العربية تعود قريباً .

# اعتزال هذه الفترة | المؤسسة العربية تعود قريباً .

Posted
event :  
' onClientGUIClick ' 
  
sound = guiGetText(edit) 
playSound(text) 
  
  

اهم شيء راح تحتاجه

يعني الحين الاكواد كامله صح؟

Posted

ايش تقصد بكاملة

أستخدم

'onClientGUIClick' 
guiGetText 
playSound 

لازم رابط الأنشودة يكون مباشر

"A Year from Now You May Wish You Had Started Today"

Posted
ايش تقصد بكاملة

أستخدم

'onClientGUIClick' 
guiGetText 
playSound 

لازم رابط الأنشودة يكون مباشر

ادري بس احسب الاكواد ناقصه

Posted

addEventHandler( "onClientGUIClick" ,root , function () 
if ( source == Button) then  
local GetText = guiGetText( Edit ) 
local Music = playSound ( GetText ) 
setSoundVolume(Music, 0.1) 
end 
end 
) 

i_32f18af6671.jpg

لا اله الا انت سبحانك اني كنت من الظالمين..#

Name: #Monster , #Master

Skype : fcbmjnon

Posted
addEventHandler( "onClientGUIClick" ,root , function () 
if ( source == Button) then  -- اسم الوحه 
local GetText = guiGetText( Edit ) -- اسم الاديت بوكس 
local Music = playSound ( GetText ) - - اسم الزر 
setSoundVolume(Music, 0.1) 
end 
end 
) 

صح ولا خطاء

Posted

صحيح بس لازم يحط سترنق :/

والصوت راح يكون ضعيف حاط قوة الصوت 1

addEventHandler( "onClientGUIClick" ,root , function () 
if ( source == Button) then  
local GetText = guiGetText( Edit ) 
local Music = playSound ( tostring(GetText) )  
setSoundVolume(Music, 0.5) 
end 
end 
) 

"A Year from Now You May Wish You Had Started Today"

Posted (edited)

انا سويت مثال و ما جربته

يا رب يشتغل

ملاحظة يفتح من

فى اف 8

o يفتح

e يغلق

  
  
GUIEditor = { 
    button = {}, 
    window = {}, 
    edit = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(532, 164, 249, 173, "Sound", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
  
        E1 = guiCreateEdit(9, 30, 230, 30, "url", false, GUIEditor.window[1]) 
        B1 = guiCreateButton(9, 66, 113, 29, "Play", false, GUIEditor.window[1]) 
        guiSetProperty(B1, "NormalTextColour", "FFAAAAAA") 
        B2 = guiCreateButton(126, 66, 113, 29, "Stop", false, GUIEditor.window[1]) 
        guiSetProperty(B2, "NormalTextColour", "FFAAAAAA") 
        E2 = guiCreateEdit(67, 101, 104, 26, "Volume", false, GUIEditor.window[1]) 
        guiSetProperty(E2, "NormalTextColour", "FFFF9C00") 
        B3 = guiCreateButton(69, 131, 102, 32, "Set", false, GUIEditor.window[1]) 
        guiSetProperty(B3, "NormalTextColour", "FFAAAAAA")     
    end 
) 
  
 s = guiGetText(E1) 
 v = guiGetText(E2) 
  
 addEventHandler("onClientGUIClick",root, 
 function () 
 if source == B1 then 
    sound = playSound(s) 
  end 
 end 
) 
  
 addEventHandler("onClientGUIClick",root, 
 function () 
 if source == B2 then 
    stopSound( sound ) 
    end 
 end 
) 
  
 addEventHandler("onClientGUIClick",root, 
 function () 
 if source == B2 then 
    setSoundVolume(sound, v) 
  end 
 end 
) 
         
         
function o() 
guiSetVisible(GUIEditor.window[1],true) 
showCursor( true ) 
guiSetInputEnabled( true ) 
end 
addCommandHandler("o",o) 
  
function e() 
guiSetVisible(GUIEditor.window[1],false) 
showCursor( false ) 
guiSetInputEnabled( false ) 
end 
addCommandHandler("e",e) 

Edited by Guest
Posted
صحيح بس لازم يحط سترنق :/

والصوت راح يكون ضعيف حاط قوة الصوت 1

addEventHandler( "onClientGUIClick" ,root , function () 
if ( source == Button) then  
local GetText = guiGetText( Edit ) 
local Music = playSound ( tostring(GetText) )  
setSoundVolume(Music, 0.5) 
end 
end 
) 

شكرا جاري التجربه

Posted
انا سويت مثال و ما جربته

يا رب يشتغل

ملاحظة يفتح من

فى اف 8

o يفتح

e يغلق

  
 s = guiGetText(E1) 
 v = guiGetText(E2) 
 sound = playSound( s, false ) 
GUIEditor = { 
    button = {}, 
    window = {}, 
    edit = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(532, 164, 249, 173, "Sound", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
  
        E1 = guiCreateEdit(9, 30, 230, 30, "url", false, GUIEditor.window[1]) 
        B1 = guiCreateButton(9, 66, 113, 29, "Play", false, GUIEditor.window[1]) 
        guiSetProperty(B1, "NormalTextColour", "FFAAAAAA") 
        B2 = guiCreateButton(126, 66, 113, 29, "Stop", false, GUIEditor.window[1]) 
        guiSetProperty(B2, "NormalTextColour", "FFAAAAAA") 
        E2 = guiCreateEdit(67, 101, 104, 26, "Volume", false, GUIEditor.window[1]) 
        guiSetProperty(E2, "NormalTextColour", "FFFF9C00") 
        B3 = guiCreateButton(69, 131, 102, 32, "Set", false, GUIEditor.window[1]) 
        guiSetProperty(B3, "NormalTextColour", "FFAAAAAA")     
    end 
) 
  
  
 addEventHandler("onClientGUIClick",root, 
 function () 
 if source == B1 then 
    sound = playSound(s) 
  end 
 end 
) 
  
 addEventHandler("onClientGUIClick",root, 
 function () 
 if source == B2 then 
    stopSound( sound ) 
    end 
 end 
) 
  
 addEventHandler("onClientGUIClick",root, 
 function () 
 if source == B2 then 
    setSoundVolume(sound, v) 
  end 
 end 
) 
         
         
function o() 
guiSetVisible(GUIEditor.window[1],true) 
showCursor( true ) 
guiSetInputEnabled( true ) 
end 
addCommandHandler("o",o) 
  
function e() 
guiSetVisible(GUIEditor.window[1],false) 
showCursor( false ) 
guiSetInputEnabled( false ) 
end 
addCommandHandler("e",e) 

وش تبي تسوي أنت؟ هريسة؟

"A Year from Now You May Wish You Had Started Today"

Posted
انا سويت مثال و ما جربته

يا رب يشتغل

ملاحظة يفتح من

فى اف 8

o يفتح

e يغلق

  
 s = guiGetText(E1) 
 v = guiGetText(E2) 
 sound = playSound( s, false ) 
GUIEditor = { 
    button = {}, 
    window = {}, 
    edit = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(532, 164, 249, 173, "Sound", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
  
        E1 = guiCreateEdit(9, 30, 230, 30, "url", false, GUIEditor.window[1]) 
        B1 = guiCreateButton(9, 66, 113, 29, "Play", false, GUIEditor.window[1]) 
        guiSetProperty(B1, "NormalTextColour", "FFAAAAAA") 
        B2 = guiCreateButton(126, 66, 113, 29, "Stop", false, GUIEditor.window[1]) 
        guiSetProperty(B2, "NormalTextColour", "FFAAAAAA") 
        E2 = guiCreateEdit(67, 101, 104, 26, "Volume", false, GUIEditor.window[1]) 
        guiSetProperty(E2, "NormalTextColour", "FFFF9C00") 
        B3 = guiCreateButton(69, 131, 102, 32, "Set", false, GUIEditor.window[1]) 
        guiSetProperty(B3, "NormalTextColour", "FFAAAAAA")     
    end 
) 
  
  
 addEventHandler("onClientGUIClick",root, 
 function () 
 if source == B1 then 
    sound = playSound(s) 
  end 
 end 
) 
  
 addEventHandler("onClientGUIClick",root, 
 function () 
 if source == B2 then 
    stopSound( sound ) 
    end 
 end 
) 
  
 addEventHandler("onClientGUIClick",root, 
 function () 
 if source == B2 then 
    setSoundVolume(sound, v) 
  end 
 end 
) 
         
         
function o() 
guiSetVisible(GUIEditor.window[1],true) 
showCursor( true ) 
guiSetInputEnabled( true ) 
end 
addCommandHandler("o",o) 
  
function e() 
guiSetVisible(GUIEditor.window[1],false) 
showCursor( false ) 
guiSetInputEnabled( false ) 
end 
addCommandHandler("e",e) 

وش تبي تسوي أنت؟ هريسة؟

-_-

Posted

أنت حاط أول الملف

 s = guiGetText(E1) 
 v = guiGetText(E2) 

وأنشاء الايديت تحت

السيرفر راح يقرأ من فوق راح يشوف وين الاديت ما راح يلقاه

"A Year from Now You May Wish You Had Started Today"

Posted

جربته ماضبط

الكود

GUIEditor_Label = {} 
  
wnd = guiCreateWindow(203,191,462,343,"لوحة سماع القران - الاناشيد فقط : *",false) 
mp3 = guiCreateEdit(17,114,418,35,"",false,wnd) 
start = guiCreateButton(283,207,152,48,"تشغيل / ايقاف",false,wnd) 
guiSetFont(start,"default-bold-small") 
GUIEditor_Label[1] = guiCreateLabel(150,84,129,20,"رابط القران او الانشوده",false,wnd) 
guiSetFont(GUIEditor_Label[1],"default-bold-small") 
GUIEditor_Label[2] = guiCreateLabel(68,53,278,20,"mp3  ملاحضه : يجب ان يكون رابط الانشود او القران ",false,wnd) 
guiSetFont(GUIEditor_Label[2],"default-bold-small") 
x = guiCreateButton(13,209,152,48,"x اغلاق الوحه ",false,wnd) 
guiSetFont(x,"default-bold-small") 
GUIEditor_Label[3] = guiCreateLabel(88,24,219,21,"ابراء ذمتي في سماع شيء يغضب الله : )",false,wnd) 
guiSetFont(GUIEditor_Label[3],"default-bold-small") 
GUIEditor_Label[4] = guiCreateLabel(16,303,130,21,"#_PeTer.Ne[x]T<3",false,wnd) 
guiSetFont(GUIEditor_Label[4],"clear-normal") 
  
  
  
  
addEventHandler("onClientGUIClick",root, 
    function () 
        if ( source == x ) then 
            guiSetVisible( wnd ,false) 
            showCursor(false) 
        end 
    end 
) 
  
  
addEventHandler( "onClientGUIClick" ,root , function () 
if ( source == wnd) then 
local GetText = guiGetText( mp3 ) 
local Music = playSound ( tostring(start) ) 
setSoundVolume(Music, 0.5) 
end 
end 
) 
  
  
  
  
guiSetVisible (wnd, false) 
function OpenWin() 
    if guiGetVisible ( wnd ) then    
       guiSetVisible ( wnd, false ) 
       showCursor(false) 
       guiSetInputEnabled(false) 
    else 
        guiSetVisible ( wnd, true ) 
        showCursor(true) 
        guiSetInputEnabled(true) 
  
    end 
end 
bindKey("F10", "down", OpenWin) 
  
  

Posted (edited)
جربته ماضبط

الكود

GUIEditor_Label = {} 
  
wnd = guiCreateWindow(203,191,462,343,"لوحة سماع القران - الاناشيد فقط : *",false) 
mp3 = guiCreateEdit(17,114,418,35,"",false,wnd) 
start = guiCreateButton(283,207,152,48,"تشغيل / ايقاف",false,wnd) 
guiSetFont(start,"default-bold-small") 
GUIEditor_Label[1] = guiCreateLabel(150,84,129,20,"رابط القران او الانشوده",false,wnd) 
guiSetFont(GUIEditor_Label[1],"default-bold-small") 
GUIEditor_Label[2] = guiCreateLabel(68,53,278,20,"mp3  ملاحضه : يجب ان يكون رابط الانشود او القران ",false,wnd) 
guiSetFont(GUIEditor_Label[2],"default-bold-small") 
x = guiCreateButton(13,209,152,48,"x اغلاق الوحه ",false,wnd) 
guiSetFont(x,"default-bold-small") 
GUIEditor_Label[3] = guiCreateLabel(88,24,219,21,"ابراء ذمتي في سماع شيء يغضب الله : )",false,wnd) 
guiSetFont(GUIEditor_Label[3],"default-bold-small") 
GUIEditor_Label[4] = guiCreateLabel(16,303,130,21,"#_PeTer.Ne[x]T<3",false,wnd) 
guiSetFont(GUIEditor_Label[4],"clear-normal") 
  
  
  
  
addEventHandler("onClientGUIClick",root, 
    function () 
        if ( source == x ) then 
            guiSetVisible( wnd ,false) 
            showCursor(false) 
        end 
    end 
) 
  
  
addEventHandler( "onClientGUIClick" ,root , function () 
if ( source == wnd) then 
local GetText = guiGetText( mp3 ) 
local Music = playSound ( tostring(start) ) 
setSoundVolume(Music, 0.5) 
end 
end 
) 
  
  
  
  
guiSetVisible (wnd, false) 
function OpenWin() 
    if guiGetVisible ( wnd ) then    
       guiSetVisible ( wnd, false ) 
       showCursor(false) 
       guiSetInputEnabled(false) 
    else 
        guiSetVisible ( wnd, true ) 
        showCursor(true) 
        guiSetInputEnabled(true) 
  
    end 
end 
bindKey("F10", "down", OpenWin) 
  
  

GUIEditor_Label = {} 
  
wnd = guiCreateWindow(203,191,462,343,"لوحة سماع القران - الاناشيد فقط : *",false) 
mp3 = guiCreateEdit(17,114,418,35,"",false,wnd) 
start = guiCreateButton(283,207,152,48,"تشغيل / ايقاف",false,wnd) 
guiSetFont(start,"default-bold-small") 
GUIEditor_Label[1] = guiCreateLabel(150,84,129,20,"رابط القران او الانشوده",false,wnd) 
guiSetFont(GUIEditor_Label[1],"default-bold-small") 
GUIEditor_Label[2] = guiCreateLabel(68,53,278,20,"mp3  ملاحضه : يجب ان يكون رابط الانشود او القران ",false,wnd) 
guiSetFont(GUIEditor_Label[2],"default-bold-small") 
x = guiCreateButton(13,209,152,48,"x اغلاق الوحه ",false,wnd) 
guiSetFont(x,"default-bold-small") 
GUIEditor_Label[3] = guiCreateLabel(88,24,219,21,"ابراء ذمتي في سماع شيء يغضب الله : )",false,wnd) 
guiSetFont(GUIEditor_Label[3],"default-bold-small") 
GUIEditor_Label[4] = guiCreateLabel(16,303,130,21,"#_PeTer.Ne[x]T<3",false,wnd) 
guiSetFont(GUIEditor_Label[4],"clear-normal") 
  
  
  
  
addEventHandler("onClientGUIClick",root, 
    function () 
        if ( source == x ) then 
            guiSetVisible( wnd ,false) 
            showCursor(false) 
        end 
    end 
) 
  
  
addEventHandler( "onClientGUIClick" ,root , function () 
if ( source == start) then 
local GetText = guiGetText( mp3 ) 
local Music = playSound ( tostring(GetText) ) 
setSoundVolume(Music, 0.5) 
end 
end 
) 
  
  
  
  
guiSetVisible (wnd, false) 
function OpenWin() 
    if guiGetVisible ( wnd ) then   
       guiSetVisible ( wnd, false ) 
       showCursor(false) 
       guiSetInputEnabled(false) 
    else 
        guiSetVisible ( wnd, true ) 
        showCursor(true) 
        guiSetInputEnabled(true) 
  
    end 
end 
bindKey("F10", "down", OpenWin) 
  
  
Edited by Guest
Posted

if source == wnd ?

source = الزر الي ضغط عليه الاعب وانت مسوي تحقق اذا الزر هو الوحة نفسها

addEventHandler( "onClientGUIClick" ,root , function () 
if ( source == start) then 
local GetText = guiGetText(mp3) 
local Music = playSound ( tostring(GetText) ) 
setSoundVolume(Music, 0.5) 
end 
end 
) 

# اعتزال هذه الفترة | المؤسسة العربية تعود قريباً .

# اعتزال هذه الفترة | المؤسسة العربية تعود قريباً .

# اعتزال هذه الفترة | المؤسسة العربية تعود قريباً .

# اعتزال هذه الفترة | المؤسسة العربية تعود قريباً .

# اعتزال هذه الفترة | المؤسسة العربية تعود قريباً .

# اعتزال هذه الفترة | المؤسسة العربية تعود قريباً .

Posted
انا سويت مثال و ما جربته

يا رب يشتغل

ملاحظة يفتح من

فى اف 8

o يفتح

e يغلق

  
  
GUIEditor = { 
    button = {}, 
    window = {}, 
    edit = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(532, 164, 249, 173, "Sound", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
  
        E1 = guiCreateEdit(9, 30, 230, 30, "url", false, GUIEditor.window[1]) 
        B1 = guiCreateButton(9, 66, 113, 29, "Play", false, GUIEditor.window[1]) 
        guiSetProperty(B1, "NormalTextColour", "FFAAAAAA") 
        B2 = guiCreateButton(126, 66, 113, 29, "Stop", false, GUIEditor.window[1]) 
        guiSetProperty(B2, "NormalTextColour", "FFAAAAAA") 
        E2 = guiCreateEdit(67, 101, 104, 26, "Volume", false, GUIEditor.window[1]) 
        guiSetProperty(E2, "NormalTextColour", "FFFF9C00") 
        B3 = guiCreateButton(69, 131, 102, 32, "Set", false, GUIEditor.window[1]) 
        guiSetProperty(B3, "NormalTextColour", "FFAAAAAA")     
    end 
) 
  
 s = guiGetText(E1) 
 v = guiGetText(E2) 
  
 addEventHandler("onClientGUIClick",root, 
 function () 
 if source == B1 then 
    sound = playSound(s) 
  end 
 end 
) 
  
 addEventHandler("onClientGUIClick",root, 
 function () 
 if source == B2 then 
    stopSound( sound ) 
    end 
 end 
) 
  
 addEventHandler("onClientGUIClick",root, 
 function () 
 if source == B2 then 
    setSoundVolume(sound, v) 
  end 
 end 
) 
         
         
function o() 
guiSetVisible(GUIEditor.window[1],true) 
showCursor( true ) 
guiSetInputEnabled( true ) 
end 
addCommandHandler("o",o) 
  
function e() 
guiSetVisible(GUIEditor.window[1],false) 
showCursor( false ) 
guiSetInputEnabled( false ) 
end 
addCommandHandler("e",e) 

جربت ذا ؟

Posted
الحين مدري ايت كود هوا الصح
صحيح z24d كود

بس ياحبكم لتطويل المواضيع

طيب جربته بس ماضبط مدريلي

Posted
صحيح z24d كود

بس ياحبكم لتطويل المواضيع

كتبته بنفس الوقت وما شفت رده :|

# اعتزال هذه الفترة | المؤسسة العربية تعود قريباً .

# اعتزال هذه الفترة | المؤسسة العربية تعود قريباً .

# اعتزال هذه الفترة | المؤسسة العربية تعود قريباً .

# اعتزال هذه الفترة | المؤسسة العربية تعود قريباً .

# اعتزال هذه الفترة | المؤسسة العربية تعود قريباً .

# اعتزال هذه الفترة | المؤسسة العربية تعود قريباً .

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...