King12 Posted July 4, 2013 Author Share Posted July 4, 2013 كيف اوامر؟ الا تقدر ضيف بالتيبل .. قصدك تسوي متغير مثل كذآ ؟ local Text = 'Hello Woovie!' outputChatBox ( Text ) يب قصدي من ناحية الاوامر ما اقدر اضيف اكثر من كوماند حدي واحد الاول راح يشتغل الثاني مايشتغل Link to comment
iPrestege Posted July 4, 2013 Share Posted July 4, 2013 الا تقدر تضيف اوامر بالتيبل .. { 'Command','Path','Message' }, Command : الامر الي يشغل الصوت Path : الملف حق الصوت للكوماند Message : اللي يطلع بالشات! للكوماند Link to comment
King12 Posted July 4, 2013 Author Share Posted July 4, 2013 (edited) بس شف هذا حاطه انت outputChatBox ( '[sounds]blabla Sound Has Been Started By هذا محدد للآمر الاول اضفت امر ثاني وعيا يشتغل مايطلع شي انا ابي اسوي متغير لـ هذي blabla واربطها بالـ message فوق Edited July 4, 2013 by Guest Link to comment
King12 Posted July 4, 2013 Author Share Posted July 4, 2013 ورني الكود مع الامرين كامل ! -- Server Side! local vCommandLoader = { { 'bla','Sound/bukbuk.mp3','Sound'}, { 'test','Sound/apologize.mp3','ss'} } addEventHandler('onPlayerCommand',root, function ( vCmd ) if isObjectInACLGroup ("user."..getAccountName ( getPlayerAccount ( source ) ), aclGetGroup ( 'Admin' ) ) then for index,value in ipairs ( vCommandLoader ) do if ( vCmd == value [ 1 ] ) then triggerClientEvent ( 'vSoundStartHandler',root,value [ 2 ] ); outputChatBox ( value [ 3 ],source,255,255,255,true ) outputChatBox ( '[sounds]blabla Sound Has Been Started By '..getPlayerName( source )..' ',root,255,255,255,true ) elseif ( vCmd == 'stopS' ) then triggerClientEvent ( 'vSoundStopHandler',root ); end; end; end; end ); -- Client Side! addEvent('vSoundStartHandler',true) addEventHandler('vSoundStartHandler',root, function ( vPath ) if vPath then if isElement ( vSound ) then destroyElement ( vSound ); end; vSound = playSound ( vPath ); end; end ); addEvent('vSoundStopHandler',true) addEventHandler('vSoundStopHandler',root, function ( ) if isElement ( vSound ) then destroyElement ( vSound ); end; end ); Link to comment
iPrestege Posted July 4, 2013 Share Posted July 4, 2013 شغال تمام معي يشغل الصوت ثم يطلع الشات حق الكوماند ويطلع انة الصوت اشتغل ..الخ! Link to comment
King12 Posted July 4, 2013 Author Share Posted July 4, 2013 بس الامر الثاني مايطلع شي بمقصد انه الامر الثاني ابي له outputchatbox لحاله Link to comment
iPrestege Posted July 4, 2013 Share Posted July 4, 2013 انت مسوي لة بالتيبل ؟ cmd,path,msg ! Link to comment
King12 Posted July 4, 2013 Author Share Posted July 4, 2013 انت مسوي لة بالتيبل ؟ cmd,path,msg ! مضبطها فوق وكل شي بس عيت مشكلتها الكوماند الاول يشتغل بس الثاني يعيي مايشتغل ولا يصير شي >< بس قلت لك ماينفع اسوي متغير للمسج ؟ Link to comment
iPrestege Posted July 4, 2013 Share Posted July 4, 2013 الا ضابطة لكلمة تطلع s Sound ! Link to comment
iPrestege Posted July 4, 2013 Share Posted July 4, 2013 شغال انا كتب bla > اشتغل الصوت وطلع الشات حقها s وطلع انة الصوت اشتغل ..من قبل الخ والثاني نفس الكلام! Link to comment
King12 Posted July 4, 2013 Author Share Posted July 4, 2013 الثاني يطلع نفس الـ outputchatbox انا ابي كلام ثاني يطلع للآمر الثاني Link to comment
iPrestege Posted July 4, 2013 Share Posted July 4, 2013 وهذا اللي صاير | = ؟ يطلع لكل كوماند كلمة الاول s الثاني Sound الشات الثاني لانة محطوط كذا لاي كوماند ماتقدر تجيب اسم الاعب ممن التيبل بس تقدر تسوي للتيبل اضافة كلام وتجيب الاعب بمكان معين Link to comment
King12 Posted July 4, 2013 Author Share Posted July 4, 2013 طيب و blabla هذي تتغير ؟ لما اسوي الامر الثاني ؟ تعديل : جربت الامر الثاني عندي وماضبط انا ابيه لكل كوماند فوق يطلع له outputchatbox يدعم التلوين + يطلع اسم الشخص اللي كتب الامر Link to comment
iPrestege Posted July 4, 2013 Share Posted July 4, 2013 غير كوماند test > آي شيء هو مثل اللي تبية يدعم الالوان وكل شيء | = Link to comment
فاّرس Posted July 4, 2013 Share Posted July 4, 2013 local vCommandLoader = { { 'bla','Sound/bukbuk.mp3','Sound1'}, { 'blaa','Sound/apologize.mp3','Sound203'} } addEventHandler('onPlayerCommand',root, function ( vCmd ) if isObjectInACLGroup ("user."..getAccountName ( getPlayerAccount ( source ) ), aclGetGroup ( 'Admin' ) ) then for index,value in ipairs ( vCommandLoader ) do if ( vCmd == value [ 1 ] ) then triggerClientEvent ( 'vSoundStartHandler',root,value [ 2 ] ); outputChatBox (value[ 3 ],source,255,255,255,true ) outputChatBox ( '[sounds]blabla Sound Has Been Started By '..getPlayerName( source )..' ',root,255,255,255,true ) elseif ( vCmd == 'stopS' ) then triggerClientEvent ( 'vSoundStopHandler',root ); end; end; end; end ); لو كتبت الامر bla راح يطلع, - Sound1 ولو كتبت الامر blaa راح يطلع ,- Sound203 Link to comment
King12 Posted July 4, 2013 Author Share Posted July 4, 2013 local vCommandLoader = { { 'bla','Sound.wav','Sound1'}, { 'blaa','Sound.wav','Sound203'} } addEventHandler('onPlayerCommand',root, function ( vCmd ) if isObjectInACLGroup ("user."..getAccountName ( getPlayerAccount ( source ) ), aclGetGroup ( 'Admin' ) ) then for index,value in ipairs ( vCommandLoader ) do if ( vCmd == value [ 1 ] ) then triggerClientEvent ( 'vSoundStartHandler',root,value [ 2 ] ); outputChatBox (value[ 3 ],source,255,255,255,true ) outputChatBox ( '[sounds]blabla Sound Has Been Started By '..getPlayerName( source )..' ',root,255,255,255,true ) elseif ( vCmd == 'stopS' ) then triggerClientEvent ( 'vSoundStopHandler',root ); end; end; end; end ); لو كتبت الامر bla راح يطلع, - Sound1 ولو كتبت الامر blaa راح يطلع ,- Sound203 ماقلت شي , بس قصدي ابيه الكلام يطلع يقبل اللون + يطلع اسم اللاعب Link to comment
iPrestege Posted July 4, 2013 Share Posted July 4, 2013 كودي اللي حطيتة مثل اللي تبية يقبل الالوان ويطلع الاسم ويطلع الكلام اللي تبية للكوماند! يعني تبي يطلع اسم الاعب مع كلام الكوماند؟ Link to comment
King12 Posted July 4, 2013 Author Share Posted July 4, 2013 قصدي لما يكتب bla يطلع بالشات bla sound started by King12 واذا كتبت blaa يطلع بالشات blaa sound started by King12 يكون يدعم الالوان Link to comment
iPrestege Posted July 4, 2013 Share Posted July 4, 2013 (edited) بالله عليك .. تفضل : -- Removed Edited July 4, 2013 by Guest Link to comment
King12 Posted July 4, 2013 Author Share Posted July 4, 2013 تسلم ماقصرت , الله يوفقك يارب وآسف ع آني تعبتك معي لوقت طويل آتمنى منك تحذف الكود لاهنت Link to comment
iPrestege Posted July 4, 2013 Share Posted July 4, 2013 ويآك ان شاء الله .. الله يسلمك Link to comment
فاّرس Posted July 4, 2013 Share Posted July 4, 2013 لو تبون تحذفون اكواد روحوا خآص , لان هناآ في ناس تبي تستفيد وانتواتحذفوا , ._. Link to comment
King12 Posted July 4, 2013 Author Share Posted July 4, 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