mr.Extreme Posted August 20, 2013 Share Posted August 20, 2013 اسلام عليكم طبعا انا عندي مشكلة في صوت لما اشغل صوت لاعبين ما يسمعو صوت وهذا الاكواد كلنت function music() local sound = playSound("music/sound.mp3") setSoundVolume(sound, 50) setSoundMaxDistance( sound, 5000 ) triggerServerEvent("sound", getLocalPlayer()) end addCommandHandler("music.sound", music ) طبعا انا سويتها بس كيف بدي اخليها للادمن او للفريق وشكرا :] Link to comment
iPrestege Posted August 20, 2013 Share Posted August 20, 2013 الكود حوسة و ضح اللي تبية .. Link to comment
Mr.Beshr Posted August 20, 2013 Share Posted August 20, 2013 يعني تبي الامر ما يقدر يكتبه الا الادمن ؟؟ ولا وش قصدك Link to comment
mr.Extreme Posted August 20, 2013 Author Share Posted August 20, 2013 لما اكتب الامر تشتغل صوت بس انا بسمع صوت ولاعبين ما يسمعو صوت وانا بدي خلي لاعبين يسمعوو صوت وش الحل؟؟؟ Link to comment
iPrestege Posted August 20, 2013 Share Posted August 20, 2013 سوي الكوماند سيرفر و يوم تكتبة يروح للكلنت للكل ويشتغل الصوت .. Link to comment
Mr.Beshr Posted August 20, 2013 Share Posted August 20, 2013 سوي الامر سيرفر وسوي ترايقر للكلينت وبس Link to comment
mr.Extreme Posted August 20, 2013 Author Share Posted August 20, 2013 اعطيك الكود كلنت و سيرفر وتشوف وش الحل وهذا كلنت function music() local sound = playSound("music/sound.mp3") setSoundVolume(sound, 50) setSoundMaxDistance( sound, 5000 ) triggerServerEvent("sound", getLocalPlayer()) end addCommandHandler("music.sound", music ) هذا سيرفر addEvent("sound", true) addEventHandler("sound", root, function () local name = getPlayerName(source) local r,g,b = getPlayerNametagColor ( source ) outputChatBox ( "" .. name .. ": #2600FF start sound.", getRootElement(), r, g, b, true ) end ) Link to comment
xFace[B]ook Posted August 20, 2013 Share Posted August 20, 2013 client : function music() local sound = playSound("music/sound.mp3") setSoundVolume(sound, 50) setSoundMaxDistance( sound, 5000 ) end addEvent( "sound", true ) addEventHandler( "sound", getRootElement(), music ) server : function music() triggerClientEvent ( "sound", getRootElement(), end addCommandHandler("music.sound", music ) Link to comment
xFace[B]ook Posted August 20, 2013 Share Posted August 20, 2013 ما يعمل !!! اكتب في اف8 debugscript 3 وشوف وش المشكلة Link to comment
mr.Extreme Posted August 20, 2013 Author Share Posted August 20, 2013 تمام اشتغل طيب اخر شيء وين بدي احط هذا الكود local name = getPlayerName(source) local r,g,b = getPlayerNametagColor ( source ) outputChatBox ( "" .. name .. ": #2600FF start sound.", getRootElement(), r, g, b, true ) كمان مسموح للادمن يستعملة Link to comment
mr.Extreme Posted August 20, 2013 Author Share Posted August 20, 2013 ماا في ردد ابيها ضروري Link to comment
iMr.Dawix~# Posted August 20, 2013 Share Posted August 20, 2013 تفضل اخوي client addEvent("start",true) function music() local sound = playSound("music/sound.mp3") setSoundVolume(sound, 50) setSoundMaxDistance( sound, 5000 ) triggerServerEvent("sound", getLocalPlayer()) end addEventHandler("start",root,music) server addEvent("sound", true) addEventHandler("sound", root, function () local name = getPlayerName(source) local r,g,b = getPlayerNametagColor ( source ) outputChatBox ( "" .. name .. ": #2600FF start sound.", getRootElement(), r, g, b, true ) end ) addCommandHandler("music.sound", function () triggerClientEvent(root,"start",root) end ) Link to comment
AHMAD1234 Posted August 20, 2013 Share Posted August 20, 2013 server side function music(player, cmd) local name = getPlayerName(player) local r,g,b = getPlayerNametagColor (player) outputChatBox ( "" .. name .. ": #2600FF start sound.", getRootElement(), r, g, b, true ) triggerClientEvent ("sound", getRootElement()) end addCommandHandler("music.sound", music) Link to comment
mr.Extreme Posted August 20, 2013 Author Share Posted August 20, 2013 يسلمووو علي كل شيء طيب بدي اخلية مسموح للادمن Link to comment
AHMAD1234 Posted August 20, 2013 Share Posted August 20, 2013 function music(player, cmd) local name = getPlayerName(player) local r,g,b = getPlayerNametagColor (player) local accountname = getAccountName (getPlayerAccount(player)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ) ) then outputChatBox ( "" .. name .. ": #2600FF start sound.", getRootElement(), r, g, b, true ) triggerClientEvent ("sound", getRootElement()) else outputChatBox ( "this command for admin group", player, 255, 0, 0, true ) return end end addCommandHandler("music.sound", music) Link to comment
mr.Extreme Posted August 20, 2013 Author Share Posted August 20, 2013 مشكووووووووووووووووووور الله يعطيك العافية Link to comment
AboShanab Posted August 20, 2013 Share Posted August 20, 2013 -- # Server Side ! function music(player, cmd) local name = getPlayerName(player) local r,g,b = getPlayerNametagColor (player) local accountname = getAccountName (getPlayerAccount(player)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ) ) then outputChatBox ( "" .. name .. ": #2600FF start sound.", getRootElement(), r, g, b, true ) triggerClientEvent (getRootElement(),"sound", getRootElement()) else outputChatBox ( "this command for admin group", player, 255, 0, 0, true ) return end end addCommandHandler("music.sound", music) اصلاح للكود كان في غلط في الترايقر للكلنت .. Link to comment
AboShanab Posted August 20, 2013 Share Posted August 20, 2013 لكن شغال الافضل الكود حقي لتفادي الاخطاء .. Link to comment
فاّرس Posted August 20, 2013 Share Posted August 20, 2013 -- # Server Side ! function music(player, cmd) local name = getPlayerName(player) local r,g,b = getPlayerNametagColor (player) local accountname = getAccountName (getPlayerAccount(player)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ) ) then outputChatBox ( "" .. name .. ": #2600FF start sound.", getRootElement(), r, g, b, true ) triggerClientEvent (getRootElement(),"sound", getRootElement()) else outputChatBox ( "this command for admin group", player, 255, 0, 0, true ) return end end addCommandHandler("music.sound", music) اصلاح للكود كان في غلط في الترايقر للكلنت .. ما يحتاج ذذ Link to comment
mr.Extreme Posted August 20, 2013 Author Share Posted August 20, 2013 انت كتبها مرتين triggerClientEvent (getRootElement(),"sound", getRootElement()) getRootElement Link to comment
iMr.Dawix~# Posted August 20, 2013 Share Posted August 20, 2013 تفضل اخويclient addEvent("start",true) function music() local sound = playSound("music/sound.mp3") setSoundVolume(sound, 50) setSoundMaxDistance( sound, 5000 ) triggerServerEvent("sound", getLocalPlayer()) end addEventHandler("start",root,music) server addEvent("sound", true) addEventHandler("sound", root, function () local name = getPlayerName(source) local r,g,b = getPlayerNametagColor ( source ) outputChatBox ( "" .. name .. ": #2600FF start sound.", getRootElement(), r, g, b, true ) end ) addCommandHandler("music.sound", function () triggerClientEvent(root,"start",root) end ) يسلمووو علي كل شيء طيب بدي اخلية مسموح للادمن isObjectInACLGroup -- اذا كنت تبيه لقروب مخصص hasObjectPermissionTo -- اذا كنت تبيه لخاصيه معينه مثل كل الي تفتح لهم لوحة الأدمنيه Link to comment
mr.Extreme Posted August 20, 2013 Author Share Posted August 20, 2013 شكرا تم الافادة 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