Jump to content

وش الخطء بهالاكواد؟


Mbtdaa

Recommended Posts

لاقصدي كل مايخش لاعب الروم

تطلع لك النافذة

يعني كل ماخش واححد طلعت لك ض2

ضض1 هذا اككثر شي يواجهني ككيف اصلحها ؟

لاتستخدم ذا الحدث

onClientPlayerJoin

استخدم هذ ا الحدث

addEventHandler('onClientResourceStart', getResourceRootElement(getThisResource()), 
    function() 
  
-----your Code 
    end 
) 

اها فهمتك :mrgreen:

Link to comment
GUIEditor = { 
    staticimage = {}, 
    edit = {}, 
} 
button = {} 
GUIEditor.staticimage[1] = guiCreateStaticImage(388, 185, 560, 484, "images/logo.png", false) 
guiSetVisible ( GUIEditor.staticimage[1], true )  
GUIEditor.staticimage[2] = guiCreateStaticImage(14, 88, 110, 86, "images/login.png", false, GUIEditor.staticimage[1]) 
GUIEditor.staticimage[4] = guiCreateStaticImage(14, 256, 110, 86, "images/login.png", false, GUIEditor.staticimage[1]) 
GUIEditor.edit[1] = guiCreateEdit(139, 127, 325, 43, "", false, GUIEditor.staticimage[1]) 
GUIEditor.edit[2] = guiCreateEdit(139, 289, 325, 43, "", false, GUIEditor.staticimage[1]) 
GUIEditor.staticimage[5] = guiCreateStaticImage(100, 0, 392, 124, "images/user.png", false, GUIEditor.staticimage[1]) 
GUIEditor.staticimage[6] = guiCreateStaticImage(139, 180, 326, 109, "images/pass.png", false, GUIEditor.staticimage[1]) 
GUIEditor.staticimage[7] = guiCreateStaticImage(38, 364, 133, 111, "images/password.png", false, GUIEditor.staticimage[1]) 
  
button.login = guiCreateButton(-0.32, -0.40, 2.26, 1.72, "", true, GUIEditor.staticimage[7]) 
guiSetAlpha(button.login, 0.00) 
  
GUIEditor.staticimage[8] = guiCreateStaticImage(397, 363, 131, 111, "images/regsiter.png", false, GUIEditor.staticimage[1]) 
  
button.register = guiCreateButton(-22, -6, 258, 155, "", false, GUIEditor.staticimage[8]) 
guiSetAlpha(button.register, 0.00) 
  
  
 addEventHandler("onClientGUIClick",root, 
    function () 
        local user = guiGetText(GUIEditor.edit[1]) 
        local pass = guiGetText(GUIEditor.edit[2]) 
        if ( source == button.login ) then 
            if string.len(user) > 0 and string.len(pass) > 0 then 
                triggerServerEvent("onLogin",localPlayer,user,pass) 
            end 
        elseif ( source == button.register ) then 
            if string.len(user) > 0 and string.len(pass) > 0 then 
                triggerServerEvent("onRegister",localPlayer,user,pass) 
            end 
        end 
    end 
) 
showCursor(true) 

Link to comment
GUIEditor = { 
    staticimage = {}, 
    edit = {}, 
} 
button = {} 
GUIEditor.staticimage[1] = guiCreateStaticImage(388, 185, 560, 484, "images/logo.png", false) 
guiSetVisible ( GUIEditor.staticimage[1], true )  
showCursor(true) 
GUIEditor.staticimage[2] = guiCreateStaticImage(14, 88, 110, 86, "images/login.png", false, GUIEditor.staticimage[1]) 
GUIEditor.staticimage[4] = guiCreateStaticImage(14, 256, 110, 86, "images/login.png", false, GUIEditor.staticimage[1]) 
GUIEditor.edit[1] = guiCreateEdit(139, 127, 325, 43, "", false, GUIEditor.staticimage[1]) 
GUIEditor.edit[2] = guiCreateEdit(139, 289, 325, 43, "", false, GUIEditor.staticimage[1]) 
GUIEditor.staticimage[5] = guiCreateStaticImage(100, 0, 392, 124, "images/user.png", false, GUIEditor.staticimage[1]) 
GUIEditor.staticimage[6] = guiCreateStaticImage(139, 180, 326, 109, "images/pass.png", false, GUIEditor.staticimage[1]) 
GUIEditor.staticimage[7] = guiCreateStaticImage(38, 364, 133, 111, "images/password.png", false, GUIEditor.staticimage[1]) 
  
button.login = guiCreateButton(-0.32, -0.40, 2.26, 1.72, "", true, GUIEditor.staticimage[7]) 
guiSetAlpha(button.login, 0.00) 
  
GUIEditor.staticimage[8] = guiCreateStaticImage(397, 363, 131, 111, "images/regsiter.png", false, GUIEditor.staticimage[1]) 
  
button.register = guiCreateButton(-22, -6, 258, 155, "", false, GUIEditor.staticimage[8]) 
guiSetAlpha(button.register, 0.00) 
  
  
 addEventHandler("onClientGUIClick",root, 
    function () 
        local user = guiGetText(GUIEditor.edit[1]) 
        local pass = guiGetText(GUIEditor.edit[2]) 
        if ( source == button.login ) then 
            if string.len(user) > 0 and string.len(pass) > 0 then 
                triggerServerEvent("onLogin",localPlayer,user,pass) 
                showCursor(false) 
                guiSetVisible ( GUIEditor.staticimage[1], false )  
            end 
        elseif ( source == button.register ) then 
            if string.len(user) > 0 and string.len(pass) > 0 then 
                triggerServerEvent("onRegister",localPlayer,user,pass) 
                showCursor(false) 
                guiSetVisible ( GUIEditor.staticimage[1], false )  
            end 
        end 
    end 
) 

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