Jump to content

[مساعـدة]


Doffy

Recommended Posts

Posted

ابي اول ما الواحد يحط اي لينك في ايديت بوكس ويضغط زر تشتغل الاغنية بلرابط لكل اللي في السيرفر ولما يضغط علي زر ثاني توقف الاغنية الي هو شغلها

Posted
onClientGUIClick
guiGetText
playSound

اعتقد ما راح تحتاج الا هذولا و انتظر رد الشباب

تبي كل السيرفر يسمعها ؟؟

لازم تريقر للسيرفر و ترسله تاني للكلاينت و تستقبله باللكلاينت اعتقد ذا الصح والله اعلم

Posted

يب , الصح انه يرسلها سيرفر
triggerServerEvent( 'Event1' , localPlayer)
 

و تروح ترسلها من سيرفر لـ كلينت بس تخليها

root >_<

Posted
2 hours ago, #Soking said:

يب , الصح انه يرسلها سيرفر
triggerServerEvent( 'Event1' , localPlayer)
 

و تروح ترسلها من سيرفر لـ كلينت بس تخليها

root >_<

ابيه بي لينك مو بأغنية انا احطها ابيه بلينك

+ كمان ابيه اول ما يضغط زر ثاني يوقف الاغنية

Posted
Just now, Abu-Solo said:

شوف ابو سولو انا ابيه اول ما يحط لينك اي اغنية في ايديت بوكس ويضغط زر يشغل الاغنية الي حطها في الايديت بوكس
واول ما تضغط علي زر ثاني يوقف الاغنية فهمتني ؟

Posted
18 minutes ago, MR.NaiF-MTA said:

من الاخر تبي تتعلم واعطيك فنكشنات ولا اعطيك جاهز ؟

تعطيه جآهز ليه ؟

كذا ماراح يتعلم عطيه الفنكشنات .

Posted
1 hour ago, DmAr511 said:

 
  1. playSound3D

تقصد تحط رابط ؟

عادي لو تصير هيك 

 playSound("http://www.naif.com/wasted.mp3")
  • soundPath: the filepath or URL of the sound file you want to play. (Sound specified by filepath has to be predefined in the meta.xml file with <file /> tag.)
  • الفنكشنات
  • onClientGUIClick
    guiGetText
    triggerServerEvent
    triggerClientEvent ( root )
    playSound
    stopSound

    اعتقد مارح تحتاج الا هاذا و ممكن زر اغلاق لوحة اشياء بسيطة اذا تبي تظبط اللوحة

  • Like 1
Posted
18 hours ago, MR.NaiF-MTA said:

من الاخر تبي تتعلم واعطيك فنكشنات ولا اعطيك جاهز ؟

معليش جاهز

ونا بقرا الاكواد

وبحاول افهم منهم

Posted (edited)
----Client 
--- getx = اسم الايدت بوكس
---- Start = اسم زرار التشغيل
---- Stop = اسم زرار الايقاف

addEventHandler("onClientGUIClick",root,function()
local getx = guiGetText(MEdit)
local Name = getPlayerName(localPlayer)
if ( getx =="" ) or ( getx == " " ) then return end
if source == Start then
triggerServerEvent("Play",localPlayer,getx,Name)
elseif source == Stop then
triggerServerEvent("Stop",localPlayer)
end
end
)
addEvent("PlaySound",true)
addEventHandler("PlaySound",root,
function(getx)
pl = playSound (getx)
end
)
addEvent("StopBTN",true)
addEventHandler("StopBTN",root,
function()
stopSound( pl )
end
)


----
---Server
---

addEvent("Play",true)
addEventHandler("Play",root,
function(getx,Name)
if (getx) then
triggerClientEvent("PlaySound",root,getx)
outputChatBox("بتشغيل رابط " .. Name .. " قام اللاعب" ,root,255,0,0,true)
end
end
)

addEvent("Stop",true)
addEventHandler("Stop",root,
function()
triggerClientEvent("StopBTN",root)
end
)

 

Edited by Abu-Solo
Posted
55 minutes ago, Abu-Solo said:

----Client 
--- getx = اسم الايدت بوكس
---- Start = اسم زرار التشغيل
---- Stop = اسم زرار الايقاف

addEventHandler("onClientGUIClick",root,function()
local getx = guiGetText(MEdit)
local Name = getPlayerName(localPlayer)
if ( getx =="" ) or ( getx == " " ) then return end
if source == Start then
triggerServerEvent("Play",localPlayer,getx,Name)
elseif source == Stop then
triggerServerEvent("Stop",localPlayer)
end
end
)
addEvent("PlaySound",true)
addEventHandler("PlaySound",root,
function(getx)
pl = playSound (getx)
end
)
addEvent("StopBTN",true)
addEventHandler("StopBTN",root,
function()
stopSound( pl )
end
)


----
---Server
---

addEvent("Play",true)
addEventHandler("Play",root,
function(getx,Name)
if (getx) then
triggerClientEvent("PlaySound",root,getx)
outputChatBox("بتشغيل رابط " .. Name .. " قام اللاعب" ,root,255,0,0,true)
end
end
)

addEvent("Stop",true)
addEventHandler("Stop",root,
function()
triggerClientEvent("StopBTN",root)
end
)

 

 

triggerClientEvent("PlaySound",root,getx)

خطأ ، تحقق من الارقمنتات

Posted
----Client 
--- get = اسم الايدت بوكس
---- Start = اسم زرار التشغيل
---- Stop = اسم زرار الايقاف

addEventHandler("onClientGUIClick",root,function()
local get = guiGetText(MEdit)
local Name = getPlayerName(localPlayer)
if ( get =="" ) or ( get == " " ) then return end
if source == Start then
triggerServerEvent("Play",localPlayer,get,Name)
elseif source == Stop then
triggerServerEvent("Stop",localPlayer)
end
end
)
addEvent("PlaySound",true)
addEventHandler("PlaySound",root,
function(get)
pl = playSound (get)
end
)
addEvent("StopBTN",true)
addEventHandler("StopBTN",root,
function()
stopSound( pl )
end
)


----
---Server
---

addEvent("Play",true)
addEventHandler("Play",root,
function(get,Name)
if (get) then
triggerClientEvent("PlaySound",root,get)
outputChatBox("بتشغيل رابط " .. Name .. " قام اللاعب" ,root,255,0,0,true)
end
end
)

addEvent("Stop",true)
addEventHandler("Stop",root,
function()
triggerClientEvent("StopBTN",root)
end
)

بس الكود شغال

Posted
11 minutes ago, Abu-Solo said:

----Client 
--- get = اسم الايدت بوكس
---- Start = اسم زرار التشغيل
---- Stop = اسم زرار الايقاف

addEventHandler("onClientGUIClick",root,function()
local get = guiGetText(MEdit)
local Name = getPlayerName(localPlayer)
if ( get =="" ) or ( get == " " ) then return end
if source == Start then
triggerServerEvent("Play",localPlayer,get,Name)
elseif source == Stop then
triggerServerEvent("Stop",localPlayer)
end
end
)
addEvent("PlaySound",true)
addEventHandler("PlaySound",root,
function(get)
pl = playSound (get)
end
)
addEvent("StopBTN",true)
addEventHandler("StopBTN",root,
function()
stopSound( pl )
end
)


----
---Server
---

addEvent("Play",true)
addEventHandler("Play",root,
function(get,Name)
if (get) then
triggerClientEvent("PlaySound",root,get)
outputChatBox("بتشغيل رابط " .. Name .. " قام اللاعب" ,root,255,0,0,true)
end
end
)

addEvent("Stop",true)
addEventHandler("Stop",root,
function()
triggerClientEvent("StopBTN",root)
end
)

بس الكود شغال

 

ما أتكلم عن إذا شغال ولا لا ، إلتزم بالأرقمنتات

كودك بالكلنت مستعمل قيت كـ متغير وهي سيرفر سايد لذلك ممكن تسبب أخطاء

والتريقر صححه

Posted
1 hour ago, Abu-Solo said:

----Client 
--- getx = اسم الايدت بوكس
---- Start = اسم زرار التشغيل
---- Stop = اسم زرار الايقاف

addEventHandler("onClientGUIClick",root,function()
local getx = guiGetText(MEdit)
local Name = getPlayerName(localPlayer)
if ( getx =="" ) or ( getx == " " ) then return end
if source == Start then
triggerServerEvent("Play",localPlayer,getx,Name)
elseif source == Stop then
triggerServerEvent("Stop",localPlayer)
end
end
)
addEvent("PlaySound",true)
addEventHandler("PlaySound",root,
function(getx)
pl = playSound (getx)
end
)
addEvent("StopBTN",true)
addEventHandler("StopBTN",root,
function()
stopSound( pl )
end
)


----
---Server
---

addEvent("Play",true)
addEventHandler("Play",root,
function(getx,Name)
if (getx) then
triggerClientEvent(root,"PlaySound",root,getx)
outputChatBox("بتشغيل رابط " .. Name .. " قام اللاعب" ,root,255,0,0,true)
end
end
)

addEvent("Stop",true)
addEventHandler("Stop",root,
function()
triggerClientEvent(root,"StopBTN",root)
end
)

 

 

Posted
Just now, N3xT said:

أحسنت بس ناقصك شوي تحققات لتجنب التحذيرات والأخطاء

هههههههه

طيب يا مدرسي الخصوصي

وش هي التحققات عشان اتجنب التحذيرات والاخطار؟

Posted
Just now, N3xT said:

يعني تتحقق إذا الصوت موجود قبل لا تشغله / تشيله 

الخخ.

o.O

انا عطتيته الاكواد , يعدل بكيفه عاد

 

يضيف اللي يبي يضيفه,

انا سويت اللي علي ,

Posted
2 minutes ago, Abu-Solo said:

o.O

انا عطتيته الاكواد , يعدل بكيفه عاد

 

يضيف اللي يبي يضيفه,

انا سويت اللي علي ,

اسمع النصيحه ولا تذمر الاخ حاول يفيدك عامله بطريقه احسن +

ذي نصيحتي

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...