mr.Extreme Posted August 20, 2013 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 ) طبعا انا سويتها بس كيف بدي اخليها للادمن او للفريق وشكرا :]
Mr.Beshr Posted August 20, 2013 Posted August 20, 2013 يعني تبي الامر ما يقدر يكتبه الا الادمن ؟؟ ولا وش قصدك
mr.Extreme Posted August 20, 2013 Author Posted August 20, 2013 لما اكتب الامر تشتغل صوت بس انا بسمع صوت ولاعبين ما يسمعو صوت وانا بدي خلي لاعبين يسمعوو صوت وش الحل؟؟؟
iPrestege Posted August 20, 2013 Posted August 20, 2013 سوي الكوماند سيرفر و يوم تكتبة يروح للكلنت للكل ويشتغل الصوت ..
mr.Extreme Posted August 20, 2013 Author 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 )
xFace[B]ook Posted August 20, 2013 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 )
xFace[B]ook Posted August 20, 2013 Posted August 20, 2013 ما يعمل !!! اكتب في اف8 debugscript 3 وشوف وش المشكلة
mr.Extreme Posted August 20, 2013 Author Posted August 20, 2013 تمام اشتغل طيب اخر شيء وين بدي احط هذا الكود local name = getPlayerName(source) local r,g,b = getPlayerNametagColor ( source ) outputChatBox ( "" .. name .. ": #2600FF start sound.", getRootElement(), r, g, b, true ) كمان مسموح للادمن يستعملة
iMr.Dawix~# Posted August 20, 2013 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 )
AHMAD1234 Posted August 20, 2013 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)
mr.Extreme Posted August 20, 2013 Author Posted August 20, 2013 يسلمووو علي كل شيء طيب بدي اخلية مسموح للادمن
AHMAD1234 Posted August 20, 2013 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)
mr.Extreme Posted August 20, 2013 Author Posted August 20, 2013 مشكووووووووووووووووووور الله يعطيك العافية
AboShanab Posted August 20, 2013 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) اصلاح للكود كان في غلط في الترايقر للكلنت ..
فاّرس Posted August 20, 2013 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) اصلاح للكود كان في غلط في الترايقر للكلنت .. ما يحتاج ذذ
mr.Extreme Posted August 20, 2013 Author Posted August 20, 2013 انت كتبها مرتين triggerClientEvent (getRootElement(),"sound", getRootElement()) getRootElement
iMr.Dawix~# Posted August 20, 2013 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 -- اذا كنت تبيه لخاصيه معينه مثل كل الي تفتح لهم لوحة الأدمنيه
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