Jump to content

Help BindKey


#Ivan7

Recommended Posts

I have the script 100% done, but their is a issue with bindkey, it wont open or close when i do f2

client:

GUIEditor = { 
        window = {}, 
        label = {}, 
        memo = {} 
    } 
    addEventHandler("onClientResourceStart", resourceRoot, 
        function() 
            GUIEditor.window[2] = guiCreateWindow(277, 165, 540, 326, "Gta-Ar Admin Rules", false) 
            guiWindowSetSizable(GUIEditor.window[2], false) 
      
            adminrules = guiCreateTabPanel(11, 22, 519, 294, false, GUIEditor.window[2]) 
      
            Arabic = guiCreateTab("Spanish", adminrules) 
      
            GUIEditor.memo[2] = guiCreateMemo(5, 3, 509, 262, [[ 
    [Gta-Ar] Reglas admin: 
    
    Mute: 
    
    1) Mini Insultos = 1 hora de silencio; ex. (mierda, culo, maldito, perro, perra) 
    2) Grandes Insultos = 5 horas de silencio; ex. (coño, polla, _! _, coño) 
    3) Spam = Mute 30min; ex. (0000000000000000000 o r939393939398jdffd; SFS2) 
    4) Annoy admin = Mute 30min; ex. (Admin Dame dinero o urdimbre Admin) 
    5) Si el jugador Insultos ADMN = Mute 12 Horas 
    
    
    Kick: 
    
    1) Si el jugador está empujando en Mission 
    2) Si el jugador está bloqueando en Mission 
    3) Si el jugador está en SafeZone y tiene el monedero o maletín luego del retroceso 
    4) Entonces, si el jugador tiene una etiqueta de grupo y no en el grupo Kick 
    5) Si el jugador entonces tiene otra etiqueta Servidor Kick 
    6) Si los jugadores Nombre es Para corto plazo (menos de 4 caracteres) = Kick 
    7) Si los jugadores Nombre Contiene cualquier palabra Ilegales = Kick; ex. (MrBitch, ) 
    
    \nBan: 
    
    1) Si el jugador anuncia para otro servidor = Ban 30 días 
    2) Si el jugador Insultos Servidor = Ban permenant 
    3) Si el jugador se niega a cambiar Name = Ban 1 Hora 
    4) Si el Jugador Muertes zona de Mission = Ban 5 Horas 
    5) Si el jugador ¿Un Bug = Ban permenant 
    6) Si el jugador es ser racista = Ban permenant 
    
    Reglas for Admin: 
    
    1) Siga todas las reglas sobre y abajo 
    
    2) Estar en el Juego 3 horas al día; Si vas de vacaciones a hacer rosca en Foro y esperar Desarrollador De contestar. 
    
    3) Tener un estado activo en TeamSpeak 3 para 3 horas al día 
    
    4) No te desenmudecer nadie a menos que tenga permiso del desarrollador o la persona que 
        dio el mudo. 
    
    5) No te pido para la Promoción 
    
    6) Poderes Dont Abuso en la que afectará a la gente a tu alrededor que están jugando. 
    
    7) Siempre Help! NO IGNORAR LOS JUGADORES. 
    
    -- s8) --> Si alguien se queja de ser hackeado, o ser scamed asegurarse de que tienen 
         Prueba (imagen o video) 
    
    9) Si un administrador Bans Alguien, sólo ellos o un desarrollador puede eliminar la prohibición a la persona. Si 
       quiere que la persona sea hablar eliminar la prohibición con el administrador que él o desarrollador prohibir 
    
    10) Todos los administradores deben seguir estas reglas, si ellos no y tienen 3 o más advertencias 
          entonces van a ser revocados. (SOLO CONSOLA O DESARROLLADORES DE DAR ADVERTENCIAS)]], false, Arabic) 
      
            English = guiCreateTab("English", adminrules) 
      
            GUIEditor.memo[3] = guiCreateMemo(4, 3, 511, 263, "[Gta-Ar] Admin Rules:\n\nMute:\n\n1) Mini Insults = 1 hour Mute; ex.(:~,ass,damn,dog,bitch)\n2) Big Insults = 5 hour Mute; ex.(,dick,_!_,)\n3) Spam = 30min Mute; ex.(0000000000000000000, or r939393939398jdffd;sfs2)\n4) Annoy Admin = 30min Mute; ex.( Admin Give Me Money or Admin warp)\n5) If Player Insults Admn = Mute 12 Hours\n\n\nKick:\n\n1) If Player is Shoving in Mission\n2) If Player is Blocking in Mission\n3) If Player is in SafeZone and has the Moneybag or BriefCase then Kick\n4) If Player has a Group Tag and not in that Group then Kick\n5) If Player has another Server Tag then Kick\n6) If Players Name is To Short(under 4 characters) = Kick\n7) If Players Name Contains Any Illegal Words = Kick; ex.(MrBitch,)\n\nBan:\n\n1) If Player Advertises For Another Server = Ban 30days\n2) If Player Insults Server = Ban Permenant\n3) If Player refuses to Change Name = Ban 1 Hour\n4) If Player Kills Near Mission = Ban 5 Hours\n5) If Player Does a Bug = Ban Permenant\n6) If Player is being Racist = Ban Permenant\n\nRules For Admin:\n\n1) Follow All Rules Above & Below\n\n2) Be in Game 3 Hours A Day; If going on Vacation make Thread on Forum and wait for       Developer To Reply.\n\n3) Be active in TeamSpeak 3 for 3 Hours a Day\n\n4) Dont unmute anyone unless have permission from Developer or The Person who \n   gave the mute.\n\n5) Dont ask for Promotion\n\n6) Dont Abuse Powers in which will affect The People around you who are Playing.\n7) Always Help! DONT IGNORE PLAYERS.\n\n If Anyone complains about being hacked, or being scamed make sure they have \n    Proof( Picture, or video)\n\n9) If a Admin Bans Someone, only they or a Developer can unban the person. If you \n   want the person to be unban speak with the admin who ban him or Developer\n\n10) All Admins must Follow these Rules, If they Dont and have 3 or more warnings \n      then they will be revoked. ( ONLY CONSOLE OR DEVELOPERS GIVE WARNINGS)", false, English) 
      
            Spanish = guiCreateTab("Arabic", adminrules) 
      
            GUIEditor.memo[4] = guiCreateMemo(3, 4, 512, 262, [[[Gta-Ar]Golden     
    [Gta-Ar]Golden 
    قوانين الادمنية 
    
    الميوت : 
    1- السب = ميوت ساعة ( مثل : دعس , زق , كلب , الخ ... ) 
    2- سب الاهل = ميوت يوم ( مثل :ابن كلب , الخ ) 
    3- السب +18= ميوت يومين 
    4- تخريب الشات بعبارات غير مفهومة او تطويل الشات = ميوت 30 دقيقة 
    5- ازعاج الادمنية = ميوت 30 دقيقة 
    
    الكيك : 
    1- تخريب المهمات ( الدفع في المهمات والتخريب على اللاعبين ) 
    2- سد الطريق بأي نوع من الانواع 
    3- الخطف او حمل الشنطة داخل منطقة السيف زون 
    4- وضع شعار سيرفر اخر (تحذير 3 مرات بعدها باند ساعة) 
    5- وضع شعار عصابة غير منضم لها 
    6- الاسماء الوهمية اقل من 4 احرف (تحذير 3 مرات بعدها باند ساعة) 
    7- الاسماء المسيئة 
    8- اغلاق خاصية السكرين شوت (تحذير 3 مرات بعدها باند ساعة ) 
    
    الباند : 
    1- نشر سيرفر غير متعلق بسيرفرات جراند العرب الرسمية = باند 30 يوم 
    2- سب السيرفر او الادارة = باند مؤبد 
    3- رفض تغير الاسم الوهمي او حذف شعار السيرفر =  باند ساعة 
    4- القتل امام المهمة اقل من 5 دقائق = باند 5 ساعات 
    5- استخدام البق وعدم التبليغ عنه = باند مؤبد 
    6- العنصرية بجميع انواعها = باند مؤبد 
    
    قوانين الادمنية : 
    1- اتباع جميع القوانين اعلاه 
    2- التواجد في السيرفر ما لا يقل عن 3 ساعات يوميا 
    3- التواجد في التيم سبيك بشكل مستمر 
    4- عدم ازالة الميوت عن اي لاعب مهما كان الا باذن الادارة او الادمن الي اعطاه الميوت 
    5- عدم طلب ترقيات 
    6- عدم استخدام الادمنية لصالحك والتخريب على اللاعبين 
    7- المساعدة بشكل مستمر وعدم تجاهل الزوار 
    8- الاطلاع على بلاغات اللاعبين بشكل مستمر وعدم اهمالها 
    9- على جميع الادمنية اتباع القوانين وعند مخالفتها سوف يعرض نفسه الى الانذارات]], false, Spanish) 
    guiSetVisible ( GUIEditor.window[2], false ) 
      
      
            GUIEditor.label[2] = guiCreateLabel(367, 27, 153, 15, "  Made By [Gta-Ar]#Ivan7", false, GUIEditor.window[2])     
        end 
    ) 
  
    
bindKey ( "F2", "down", 
    function ( ) 
        if guiGetVisible (GUIEditor.window[2] ) then 
        guiSetVisible ( GUIEditor.window[2], false ) 
            showCursor ( false ) 
        else 
            showCursor ( true ) 
            guiSetVisible ( GUIEditor.window[2], true ) 
        end 
    end 

Link to comment
bindKey ( "F2", "down",

function ( )

if guiGetVisible (GUIEditor.window[2] ) then

guiSetVisible ( GUIEditor.window[2], false )

showCursor ( false )

else

showCursor ( true )

guiSetVisible ( GUIEditor.window[2], true )

end

end

  
function binds() 
 if guiGetVisible (GUIEditor.window[2] ) then 
        guiSetVisible ( GUIEditor.window[2], false ) 
            showCursor ( false ) 
        else 
            showCursor ( true ) 
            guiSetVisible ( GUIEditor.window[2], true ) 
        end 
    end 
end 
  
function bindTheKeys () 
  bindKey ( "F2", "down", binds ) 
end 
addCommandHandler ( "bindme", bindTheKeys ) 

Link to comment

Paul, there are 3 "end" in that code of yours, while there's only one "function" and one "if" (this is why indentation is important). It will trigger a script loading error. Also, that command handler triggers a binding everytime the player types "bindme"? Isn't that a bit pointless (and maybe will lead to errors too)?

function binds( ) 
    guiSetVisible( GUIEditor.window[2], not guiGetVisible(GUIEditor.window[2]) ) 
    showCursor( guiGetVisible(GUIEditor.window[2]) ) 
end 
  
addCommandHandler( "rules", binds ) 
bindKey( "F2", "down", "rules" ) 

Post if there's still any error in /debugscript 3 like Et-win said!

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