FRoTE-502 Posted May 8, 2014 Share Posted May 8, 2014 السلام عليكم ورحمة الله وبركاته انا عندي مشكلهه في مود وارجو انكم تحلوههآ مثلا انا سويت لوحة ححرب وينقلهه ل مكان معين وذا المكان مايقدر يضغط لا اف1 ولا اف2 واف3 بعدين برجع الهجولة بسوي انتحآر ,, صح ؟ ليش اذا رجعت الهجولة يكون اف1 واف2 اف3 مايضغطو انا مسوي في الحرب مو في السيرفر وشكرآ.. مقدمآ Link to comment
™!>VàLéNTiNô<!™ Posted May 8, 2014 Share Posted May 8, 2014 المود @ الاكواد اللى جواه Link to comment
™!>VàLéNTiNô<!™ Posted May 8, 2014 Share Posted May 8, 2014 مافي احد يعرف!! ؟ قلتلك 4 مرات اطرح اكوادك لو تبى احد يساعدك لو تبى تحتفظ بالكود لنفسك خليه Link to comment
FRoTE-502 Posted May 8, 2014 Author Share Posted May 8, 2014 addEventHandler("onClientGUIClick",root, function () if ( source == Team1 ) then triggerServerEvent("FROTE",localPlayer) guiSetVisible(wnd,false) showCursor(false) unbindKey("F1","down",open) unbindKey("F2","down",open) unbindKey("F3","down",open) unbindKey("F4","down",open) unbindKey("F5","down",open) unbindKey("F6","down",open) unbindKey("F7","down",open) unbindKey("F8","down",open) unbindKey("F9","down",open) unbindKey("F10","down",open) unbindKey("F12","down",open) unbindKey("j","down",open) elseif ( source == Team2 ) then triggerServerEvent("FROTe",localPlayer) guiSetVisible(wnd,false) showCursor(false) unbindKey("F1","down",open) unbindKey("F2","down",open) unbindKey("F3","down",open) unbindKey("F4","down",open) unbindKey("F5","down",open) unbindKey("F6","down",open) unbindKey("F7","down",open) unbindKey("F8","down",open) unbindKey("F9","down",open) unbindKey("F10","down",open) unbindKey("F12","down",open) unbindKey("j","down",open) elseif ( source == btn ) then setElementData(localPlayer,"war",false) triggerServerEvent("onKill",localPlayer) guiSetVisible(wnd,false) showCursor(false) bindKey("F1","down",openn) unbindKey("F2","down",open) unbindKey("F3","down",open) unbindKey("F4","down",open) unbindKey("F5","down",open) unbindKey("F6","down",open) unbindKey("F7","down",open) unbindKey("F8","down",open) unbindKey("F9","down",open) unbindKey("F10","down",open) unbindKey("F12","down",open) bindKey("j","down",openn) end end ) Link to comment
xFace[B]ook Posted May 8, 2014 Share Posted May 8, 2014 addEventHandler("onClientGUIClick",root, function () if ( source == Team1 ) then triggerServerEvent("FROTE",localPlayer) guiSetVisible(wnd,false) showCursor(false) unbindKey("F1","down",open) unbindKey("F2","down",open) unbindKey("F3","down",open) unbindKey("F4","down",open) unbindKey("F5","down",open) unbindKey("F6","down",open) unbindKey("F7","down",open) unbindKey("F8","down",open) unbindKey("F9","down",open) unbindKey("F10","down",open) unbindKey("F12","down",open) unbindKey("j","down",open) elseif ( source == Team2 ) then triggerServerEvent("FROTe",localPlayer) guiSetVisible(wnd,false) showCursor(false) unbindKey("F1","down",open) unbindKey("F2","down",open) unbindKey("F3","down",open) unbindKey("F4","down",open) unbindKey("F5","down",open) unbindKey("F6","down",open) unbindKey("F7","down",open) unbindKey("F8","down",open) unbindKey("F9","down",open) unbindKey("F10","down",open) unbindKey("F12","down",open) unbindKey("j","down",open) elseif ( source == btn ) then setElementData(localPlayer,"war",false) triggerServerEvent("onKill",localPlayer) guiSetVisible(wnd,false) showCursor(false) bindKey("F1","down",openn) unbindKey("F2","down",open) unbindKey("F3","down",open) unbindKey("F4","down",open) unbindKey("F5","down",open) unbindKey("F6","down",open) unbindKey("F7","down",open) unbindKey("F8","down",open) unbindKey("F9","down",open) unbindKey("F10","down",open) unbindKey("F12","down",open) bindKey("j","down",openn) end end ) open مو معرف Link to comment
FRoTE-502 Posted May 8, 2014 Author Share Posted May 8, 2014 فيس بوك شنو يعني مو معرف ؟ Link to comment
™!>VàLéNTiNô<!™ Posted May 8, 2014 Share Posted May 8, 2014 فيس بوك شنو يعني مو معرف ؟ مو معرف = مالو معنه يعنى open = sfm,;mvag الكلمة مالها معنى فى لغة البرمجة يجب على كل كلمة ان تكون معرفة وان تكون معرف وظيفتها الى اذا كانت معرفة من اللعبة من قبل مثل الفنكشنات Link to comment
#DRAGON!FIRE Posted May 9, 2014 Share Posted May 9, 2014 local Keys = { "f1", "f2" } --- لاضافة زر اخر : , "Key Name" function cancelKey ( key ) for i = 1, #Keys do if ( key == Keys[i] ) then cancelEvent ( ) end end end addEventHandler( "onClientGUIClick", resourceRoot, function ( ) if ( source == Team1 ) then triggerServerEvent( "FROTE", localPlayer ) guiSetVisible( wnd, false ) showCursor( false ) addEventHandler ( "onClientKey", root, cancelKey ) elseif ( source == Team2 ) then triggerServerEvent( "FROTe", localPlayer ) guiSetVisible( wnd, false ) showCursor( false ) addEventHandler ( "onClientKey", root, cancelKey ) elseif ( source == btn ) then setElementData( localPlayer, "war", false ) triggerServerEvent( "onKill", localPlayer ) guiSetVisible( wnd, false ) showCursor( false ) addEventHandler ( "onClientKey", root, cancelKey ) end end ) صراحة انا ما فهمت ع اكوادك وين تبي تشيل الازرار ووين تبي تحطها فـ يوم تبي تشتغل الازرار اللي بتحطها بالجدول .. تسوي كذا : removeEventHandler ( "onClientKey", root, cancelKey ) يوم تبي تطفيها .. : addEventHandler ( "onClientKey", root, cancelKey ) j ملأحظة مهمة : الـ ( نفاثة ) ما تجي تسوي بها كذا تشيلها بـ لازم تستخدم بجانب سيرفر اكواد ثانية . Link to comment
FRoTE-502 Posted May 9, 2014 Author Share Posted May 9, 2014 local Keys = { "f1", "f2" } --- لاضافة زر اخر : , "Key Name" function cancelKey ( key ) for i = 1, #Keys do if ( key == Keys[i] ) then cancelEvent ( ) end end end addEventHandler( "onClientGUIClick", resourceRoot, function ( ) if ( source == Team1 ) then triggerServerEvent( "FROTE", localPlayer ) guiSetVisible( wnd, false ) showCursor( false ) addEventHandler ( "onClientKey", root, cancelKey ) elseif ( source == Team2 ) then triggerServerEvent( "FROTe", localPlayer ) guiSetVisible( wnd, false ) showCursor( false ) addEventHandler ( "onClientKey", root, cancelKey ) elseif ( source == btn ) then setElementData( localPlayer, "war", false ) triggerServerEvent( "onKill", localPlayer ) guiSetVisible( wnd, false ) showCursor( false ) addEventHandler ( "onClientKey", root, cancelKey ) end end ) صراحة انا ما فهمت ع اكوادك وين تبي تشيل الازرار ووين تبي تحطها فـ يوم تبي تشتغل الازرار اللي بتحطها بالجدول .. تسوي كذا : removeEventHandler ( "onClientKey", root, cancelKey ) يوم تبي تطفيها .. : addEventHandler ( "onClientKey", root, cancelKey ) j ملأحظة مهمة : الـ ( نفاثة ) ما تجي تسوي بها كذا تشيلها بـ لازم تستخدم بجانب سيرفر اكواد ثانية . بس سؤآل بسيطه cancelKey ,, احط الزر بدالهه #؟؟ Link to comment
-#Saimon Posted May 9, 2014 Share Posted May 9, 2014 بس سؤآل بسيطه cancelKey ,, احط الزر بدالهه #؟؟ لا . كآنسل افنتت هذا اسم الفنكشن الازرار تحطها في اول سطر Link to comment
iMr.Dawix~# Posted May 10, 2014 Share Posted May 10, 2014 local Keys = { "f1", "f2" } --- لاضافة زر اخر : , "Key Name" function cancelKey ( key ) for i = 1, #Keys do if ( key == Keys[i] ) then cancelEvent ( ) end end end addEventHandler( "onClientGUIClick", resourceRoot, function ( ) if ( source == Team1 ) then triggerServerEvent( "FROTE", localPlayer ) guiSetVisible( wnd, false ) showCursor( false ) addEventHandler ( "onClientKey", root, cancelKey ) elseif ( source == Team2 ) then triggerServerEvent( "FROTe", localPlayer ) guiSetVisible( wnd, false ) showCursor( false ) addEventHandler ( "onClientKey", root, cancelKey ) elseif ( source == btn ) then setElementData( localPlayer, "war", false ) triggerServerEvent( "onKill", localPlayer ) guiSetVisible( wnd, false ) showCursor( false ) addEventHandler ( "onClientKey", root, cancelKey ) end end ) صراحة انا ما فهمت ع اكوادك وين تبي تشيل الازرار ووين تبي تحطها فـ يوم تبي تشتغل الازرار اللي بتحطها بالجدول .. تسوي كذا : removeEventHandler ( "onClientKey", root, cancelKey ) يوم تبي تطفيها .. : addEventHandler ( "onClientKey", root, cancelKey ) j ملأحظة مهمة : الـ ( نفاثة ) ما تجي تسوي بها كذا تشيلها بـ لازم تستخدم بجانب سيرفر اكواد ثانية . بس سؤآل بسيطه cancelKey ,, احط الزر بدالهه #؟؟ الأزرار الي تبيهم تحطهم بالجدول هنا local Keys = { "f1", "f2","f7"} 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