King12 Posted October 7, 2014 Share Posted October 7, 2014 السلام عليكم, واجهتني مشكله بالكود حقي انه مايعطيني وجه من الآساس يعني مايسوي ان بيند function starts() setTimer( function () for i,v in pairs(getElementsByType("player")) do if (isKeyBound (v,"m")) then unbindKey(v, "M") outputChatBox("Done") else outputChatBox("Couldn't unbind the key") end end end , 2000, 1) end addEventHandler("onGamemodeMapStart", root, starts) addEventHandler("onClientMapStarting",root, starts) addEventHandler("onResourceStart", root, starts) كل مابدا السكربت ولا الماب يقول : Couldn't unbind the key طبعاً آنا احاول اسوي ان بند للزر حق الآغنيه , يعني آخليها تشتغل بس اللاعب مايقدر يطفيها Link to comment
#DRAGON!FIRE Posted October 7, 2014 Share Posted October 7, 2014 كود هريس ومخبص كلنت وسيرفر M انت تبي ما يقدر يضغط حرف ? Link to comment
King12 Posted October 7, 2014 Author Share Posted October 7, 2014 (edited) كود هريس ومخبص كلنت وسيرفر M انت تبي ما يقدر يضغط حرف ? آما هريس ويقولي ماقدر يفك البند؟ -.- آنا آبيه يشيل البند لما الماب يشتغل لآن اغلب المابرز يسوون مابات ويحطون زر الآغاني M بس دقيقه وين الكلنت بالكود؟ مع آني مسوي تريقر قبل للآفنت لكن نفس الشي : function starts() count = 1 setTimer( function() triggerServerEvent("onKeyBound", localPlayer) end, 2000, 1) end addEventHandler("onGamemodeMapStart", root, starts) addEventHandler("onClientMapStarting",root, starts) addEventHandler("onClientResourceStart", root, starts) addEvent("onKeyBound", true) addEventHandler("onBoundKey", root, function () function () for i,v in pairs(getElementsByType("player")) do if (isKeyBound (v,"m")) then unbindKey(v, "m") outputChatBox("Done") else outputChatBox("Couldn't unbind the key") end end end end ) Edited October 7, 2014 by Guest Link to comment
jafar Posted October 7, 2014 Share Posted October 7, 2014 فيه طريقة أسهل حق توقيف الأغاني .. addEventHandler ( "onClientMapStarting", root, function ( ) for i, v in ipairs ( getElementsByType ( "sound" ) ) do stopSound ( v ); end end ); Link to comment
King12 Posted October 7, 2014 Author Share Posted October 7, 2014 فيه طريقة أسهل حق توقيف الأغاني .. addEventHandler ( "onClientMapStarting", root, function ( ) for i, v in ipairs ( getElementsByType ( "sound" ) ) do stopSound ( v ); end end ); انا مابي آوقف الآغاني آبي آشيل البند حقها ( الزر ) Link to comment
AboShanab Posted October 7, 2014 Share Posted October 7, 2014 addEventHandler ( "onClientKey", root, function ( button, press ) if ( button == "m" and press ) then cancelEvent ( ) end end ) Link to comment
UAEpro Posted October 7, 2014 Share Posted October 7, 2014 انزين ليش النذالة ؟! جرب آخر كود Link to comment
#DRAGON!FIRE Posted October 7, 2014 Share Posted October 7, 2014 كنت بسوي زي ابو شنب .. جرب كود ابو شنب وراح يضبط معاك M بس للمعلومية الكود يكنسل كل شي بـ حرف Link to comment
King12 Posted October 7, 2014 Author Share Posted October 7, 2014 خلاص ضبط يعطيكم العافيه :> 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