Jump to content

مشكلةة بسيط ,, #


Recommended Posts

السلام عليكم ورحمة الله وبركاته

انا عندي مشكلهه في مود وارجو انكم تحلوههآ

مثلا انا سويت لوحة ححرب وينقلهه ل مكان معين وذا المكان مايقدر يضغط لا اف1 ولا اف2 واف3

بعدين برجع الهجولة بسوي انتحآر ,, صح ؟

ليش اذا رجعت الهجولة يكون اف1 واف2 اف3 مايضغطو انا مسوي في الحرب مو في السيرفر :shock:

وشكرآ.. مقدمآ

Link to comment
  
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
  
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
فيس بوك شنو يعني مو معرف ؟

مو معرف = مالو معنه يعنى

open = sfm,;mvag

الكلمة مالها معنى فى لغة البرمجة

يجب على كل كلمة ان تكون معرفة وان تكون معرف وظيفتها الى اذا كانت معرفة من اللعبة من قبل مثل الفنكشنات

Link to comment

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
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
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...