Jump to content

خطا في لوحة تسجيل


Recommended Posts

هلا شباب

انا سويت لوحة تسجيل اوكي

مسوي فية

login + register + guest

اول شئ

login + register مايسو شئ

اما guest

شغال

كيف اخلية يسجل + يسوي حساب

مايسون

وانا حطيت اكواد

وهذول الاكواد

هذا Client

  
GUIEditor = { 
    button = {}, 
    window = {}, 
    label = {}, 
    memo = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(318, 201, 392, 427, "~~ Real life الحياة الواقعية ~~", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
        guiSetAlpha(GUIEditor.window[1], 1.00) 
        showCursor(true) 
        showChat(false) 
        fadeCamera(false,5) 
        GUIEditor.button[1] = guiCreateButton(15, 356, 103, 61, "Login", false, GUIEditor.window[1]) 
        GUIEditor.button[3] = guiCreateButton(147, 356, 103, 61, "Register", false, GUIEditor.window[1]) 
        GUIEditor.button[2] = guiCreateButton(272, 356, 103, 61, "Guest", false, GUIEditor.window[1]) 
        GUIEditor.memo[1] = guiCreateMemo(105, 31, 251, 34, "", false, GUIEditor.window[1]) 
        GUIEditor.memo[2] = guiCreateMemo(105, 109, 251, 34, "", false, GUIEditor.window[1]) 
        GUIEditor.label[1] = guiCreateLabel(13, 35, 82, 30, "   UserName", false, GUIEditor.window[1]) 
        GUIEditor.label[2] = guiCreateLabel(15, 119, 82, 30, "   PassWord", false, GUIEditor.window[1])     
    end 
) 
addEventHandler("onClientGUIClick",root, 
function () 
if source == GUIEditor.button[1] then 
triggerServerEvent("onLogin",getRootElement(),getLocalPlayer(),guiGetText(GUIEditor.edit[1]),guiGetText(GUIEditor.edit[2]) ) 
elseif source == GUIEditor.button[2] then 
guiSetVisible(GUIEditor.window[1],false) 
showCursor(false) 
showChat(true) 
fadeCamera(true,5) 
elseif source == GUIEditor.button[3] then 
triggerServerEvent("onReg",getRootElement(),getLocalPlayer(),guiGetText(GUIEditor.edit[1]),guiGetText(GUIEditor.edit[2]) ) 
end 
end 
) 
addEvent("Hidewindow",true) 
addEventHandler("Hidewindow",root, 
function () 
guiSetVisible(GUIEditor.window[1],false) 
showCursor(false) 
showChat(true) 
fadeCamera(true,5) 
end 
) 

server

addEvent("onLogin", true) 
addEventHandler("onLogin",root, 
    function (player, user, pass, NameAccount, Password) 
        local account = getAccount ( user, pass ) 
    if ( account ~= true ) then 
        if (logIn ( player, account, pass ) == true) then 
            outputChatBox ( "You Logged in Sucessfuly!", player, 255, 255, 0 , true ) 
            triggerClientEvent (player, "Hidewindow", player) 
        else 
            outputChatBox ( "Login Error!", player, 255, 0, 0 ) 
        end 
    else 
        outputChatBox ( "Wrong username or password!", player, 255, 0, 0 ) 
    end 
    end 
) 
-- 
addEvent("onReg", true) 
addEventHandler("onReg",root, 
    function ( player, user, pass, NameAccount, Password ) 
        local account = getAccount ( user, pass ) 
    if ( account ~= false ) then 
        if (logIn ( player, account, pass ) == true) then 
            outputChatBox ( "You Registerd and Logged in Sucessfuly!", player, 255, 255, 0 ) 
            triggerClientEvent (player, "Hidewindow", player) 
        else 
            outputChatBox ( "You Are Already Logged in !", player, 255, 255, 0 ) 
            triggerClientEvent (player, "Hidewindow", player) 
        end 
    else 
        account = addAccount ( user, pass ) 
        if (logIn ( player, account, pass ) == true) then 
            outputChatBox ( "You Registerd and Logged in Sucessfuly!", player, 255, 255, 0 ) 
            triggerClientEvent (player, "Hidewindow", player) 
        else 
            outputChatBox ( "Register Error !", player, 255, 0, 0 ) 
        end 
    end 
end 
) 
  

Link to comment

انتا راسل في الترايقر بس اشيائين

addEvent("onLogin", true)

addEventHandler("onLogin",root,

function (player, user, pass, NameAccount, Password)

بس لما تستقبلة عامل 5 كيف راح يشتغل

جرب

سيرفر

addEvent("onLogin", true) 
addEventHandler("onLogin",root, 
    function (user, pass) 
        local account = getAccount ( user, pass ) 
    if ( account ~= true ) then 
        if (logIn ( source, account, pass ) == true) then 
            outputChatBox ( "You Logged in Sucessfuly!", source, 255, 255, 0 , true ) 
            triggerClientEvent (source, "Hidewindow", source) 
        else 
            outputChatBox ( "Login Error!", source, 255, 0, 0 ) 
        end 
    else 
        outputChatBox ( "Wrong username or password!", source, 255, 0, 0 ) 
    end 
    end 
) 
-- 
addEvent("onReg", true) 
addEventHandler("onReg",root, 
    function (user, pass) 
        local account = getAccount ( user, pass ) 
    if ( account ~= false ) then 
        if (logIn ( source, account, pass ) == true) then 
            outputChatBox ( "You Registerd and Logged in Sucessfuly!", source, 255, 255, 0 ) 
            triggerClientEvent (source, "Hidewindow", source) 
        else 
            outputChatBox ( "You Are Already Logged in !", source, 255, 255, 0 ) 
            triggerClientEvent (source, "Hidewindow", source) 
        end 
    else 
        account = addAccount ( user, pass ) 
        if (logIn ( source, account, pass ) == true) then 
            outputChatBox ( "You Registerd and Logged in Sucessfuly!", source, 255, 255, 0 ) 
            triggerClientEvent (source, "Hidewindow", source) 
        else 
            outputChatBox ( "Register Error !", source, 255, 0, 0 ) 
        end 
    end 
end 
) 

Link to comment

استبدلتها واشتغل

بس مشكلة

لما اسوي login + register

يقول كذا

Login Error!

Login Error!

Login Error!

Login Error!

Login Error!

Login Error!

Login Error!

Register Error !

Login Error!

Login Error!

Login Error!

Login Error!

Login Error!

مايسجل او يسجل حساب جديد

Link to comment

--- كلينت

GUIEditor = { 
    button = {}, 
    window = {}, 
    label = {}, 
    memo = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(318, 201, 392, 427, "~~ Real life الحياة الواقعية ~~", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
        guiSetAlpha(GUIEditor.window[1], 1.00) 
        showCursor(true) 
        showChat(false) 
        fadeCamera(false,5) 
        GUIEditor.button[1] = guiCreateButton(15, 356, 103, 61, "Login", false, GUIEditor.window[1]) 
        GUIEditor.button[3] = guiCreateButton(147, 356, 103, 61, "Register", false, GUIEditor.window[1]) 
        GUIEditor.button[2] = guiCreateButton(272, 356, 103, 61, "Guest", false, GUIEditor.window[1]) 
        GUIEditor.memo[1] = guiCreateMemo(105, 31, 251, 34, "", false, GUIEditor.window[1]) 
        GUIEditor.memo[2] = guiCreateMemo(105, 109, 251, 34, "", false, GUIEditor.window[1]) 
        GUIEditor.label[1] = guiCreateLabel(13, 35, 82, 30, "   UserName", false, GUIEditor.window[1]) 
        GUIEditor.label[2] = guiCreateLabel(15, 119, 82, 30, "   PassWord", false, GUIEditor.window[1])     
    end 
) 
addEventHandler("onClientGUIClick",root, 
function () 
if source == GUIEditor.button[1] then 
 triggerServerEvent("onlogin",localPlayer,guiGetText( GUIEditor.memo[1]),guiGetText( GUIEditor.memo[2])) 
elseif source == GUIEditor.button[2] then 
guiSetVisible(GUIEditor.window[1],false) 
showCursor(false) 
showChat(true) 
fadeCamera(true,5) 
elseif source == GUIEditor.button[3] then 
triggerServerEvent("onReg",localPlayer,getLocalPlayer(),guiGetText( GUIEditor.memo[1]),guiGetText( GUIEditor.memo[2]) ) 
end 
end 
) 
addEvent("Hidewindow",true) 
addEventHandler("Hidewindow",root, 
function () 
guiSetVisible(GUIEditor.window[1],false) 
showCursor(false) 
showChat(true) 
fadeCamera(true,5) 
end 
) 

--- سيرفر

  
addEvent("onlogin", true) 
addEventHandler("onlogin",root, 
    function (user, pass) 
        local account = getAccount ( user, pass ) 
    if ( account ~= true ) then 
        if (logIn ( source, account, pass ) == true) then 
            outputChatBox ( "You Logged in Sucessfuly!", source, 255, 255, 0 , true ) 
            triggerClientEvent (source, "Hidewindow", source) 
        else 
            outputChatBox ( "Login Error!", source, 255, 0, 0 ) 
        end 
    else 
        outputChatBox ( "Wrong username or password!", source, 255, 0, 0 ) 
    end 
    end 
) 
  
  
addEvent("onReg", true) 
addEventHandler("onReg",root, 
    function (user, pass) 
        local account = getAccount ( user, pass ) 
    if ( account ~= false ) then 
        if (logIn ( source, account, pass ) == true) then 
            outputChatBox ( "You Registerd and Logged in Sucessfuly!", source, 255, 255, 0 ) 
            triggerClientEvent (source, "Hidewindow", source) 
        else 
            outputChatBox ( "You Are Already Logged in !", source, 255, 255, 0 ) 
            triggerClientEvent (source, "Hidewindow", source) 
        end 
    else 
        account = addAccount ( user, pass ) 
        if (logIn ( source, account, pass ) == true) then 
            outputChatBox ( "You Registerd and Logged in Sucessfuly!", source, 255, 255, 0 ) 
            triggerClientEvent (source, "Hidewindow", source) 
        else 
            outputChatBox ( "Register Error !", source, 255, 0, 0 ) 
        end 
    end 
end 
) 
Link to comment

ماكس جربت بردو مايبي يسجل

او يسوي حساب :(

انا عدلت الوحة

  
GUIEditor = { 
    edit = {}, 
    button = {}, 
    window = {}, 
    label = {}, 
    memo = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(318, 201, 392, 427, "~~ Real life الحياة الواقعية ~~", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
        guiSetAlpha(GUIEditor.window[1], 1.00) 
        guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF00FB12") 
        showCursor(true) 
        showChat(false) 
        fadeCamera(false,5) 
        GUIEditor.button[1] = guiCreateButton(15, 356, 103, 61, "Login", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFBEC03") 
        GUIEditor.button[3] = guiCreateButton(147, 356, 103, 61, "Register", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF06F711") 
        GUIEditor.button[2] = guiCreateButton(272, 356, 103, 61, "Guest", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFFC0000") 
        GUIEditor.label[1] = guiCreateLabel(13, 35, 82, 30, "   UserName", false, GUIEditor.window[1]) 
        guiLabelSetColor(GUIEditor.label[1], 5, 107, 245) 
        GUIEditor.label[2] = guiCreateLabel(15, 119, 82, 30, "   PassWord", false, GUIEditor.window[1]) 
        guiLabelSetColor(GUIEditor.label[2], 3, 146, 246) 
        GUIEditor.edit[1] = guiCreateEdit(102, 32, 244, 23, "", false, GUIEditor.window[1]) 
        GUIEditor.edit[2] = guiCreateEdit(102, 119, 244, 23, "", false, GUIEditor.window[1]) 
        GUIEditor.memo[1] = guiCreateMemo(14, 186, 361, 151, "#A.1 ~| cit - ksa ~ الحياة الواقعية \n\n[ English ]\n\nhello every body Welcome To Real life server\n\nmany jobs  + RPG \n\nto open The telephon press N\n\npress F11 shows the jobs \n\nthx for playing\n\n[ Ar ]\n\nمرحبا بك في سيرفر العرب للحياة الواقعية\n\nتاخذ وظايف وتجيب فلوس\n\nوتشتري سيارات\n\nكانك في حياة العادية\n\nوجرافيكس مثل حقيقة\n\nوشوارع و البيوت\n\nلتفتح الجوال اطغط حرف ى", false, GUIEditor.window[1]) 
        guiMemoSetReadOnly(GUIEditor.memo[1], true)     
    end 
) 
addEventHandler("onClientGUIClick",root, 
function () 
if source == GUIEditor.button[1] then 
 triggerServerEvent("onlogin",localPlayer,guiGetText( GUIEditor.edit[1]]),guiGetText( GUIEditor.edit[2])) 
elseif source == GUIEditor.button[2] then 
guiSetVisible(GUIEditor.window[1],false) 
showCursor(false) 
showChat(true) 
fadeCamera(true,5) 
elseif source == GUIEditor.button[3] then 
triggerServerEvent("onReg",localPlayer,getLocalPlayer(),guiGetText( GUIEditor.edit[1]),guiGetText( GUIEditor.edit[2]) ) 
end 
end 
) 
addEvent("Hidewindow",true) 
addEventHandler("Hidewindow",root, 
function () 
guiSetVisible(GUIEditor.window[1],false) 
showCursor(false) 
showChat(true) 
fadeCamera(true,5) 
end 
) 

Edited by Guest
Link to comment

عدلت الوحة

وهذة الجديدة و بردو مايسجل حساب او يسجل

كلنت

  
GUIEditor = { 
    edit = {}, 
    button = {}, 
    window = {}, 
    label = {}, 
    memo = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(318, 201, 392, 427, "~~ Real life الحياة الواقعية ~~", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
        guiSetAlpha(GUIEditor.window[1], 1.00) 
        guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF00FB12") 
        showCursor(true) 
        showChat(false) 
        fadeCamera(false,5) 
        GUIEditor.button[1] = guiCreateButton(15, 356, 103, 61, "Login", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFBEC03") 
        GUIEditor.button[3] = guiCreateButton(147, 356, 103, 61, "Register", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF06F711") 
        GUIEditor.button[2] = guiCreateButton(272, 356, 103, 61, "Guest", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFFC0000") 
        GUIEditor.label[1] = guiCreateLabel(13, 35, 82, 30, "   UserName", false, GUIEditor.window[1]) 
        guiLabelSetColor(GUIEditor.label[1], 5, 107, 245) 
        GUIEditor.label[2] = guiCreateLabel(15, 119, 82, 30, "   PassWord", false, GUIEditor.window[1]) 
        guiLabelSetColor(GUIEditor.label[2], 3, 146, 246) 
        GUIEditor.edit[1] = guiCreateEdit(102, 32, 244, 23, "", false, GUIEditor.window[1]) 
        GUIEditor.edit[2] = guiCreateEdit(102, 119, 244, 23, "", false, GUIEditor.window[1]) 
        GUIEditor.memo[1] = guiCreateMemo(14, 186, 361, 151, "#A.1 ~| cit - ksa ~ الحياة الواقعية \n\n[ English ]\n\nhello every body Welcome To Real life server\n\nmany jobs  + RPG \n\nto open The telephon press N\n\npress F11 shows the jobs \n\nthx for playing\n\n[ Ar ]\n\nمرحبا بك في سيرفر العرب للحياة الواقعية\n\nتاخذ وظايف وتجيب فلوس\n\nوتشتري سيارات\n\nكانك في حياة العادية\n\nوجرافيكس مثل حقيقة\n\nوشوارع و البيوت\n\nلتفتح الجوال اطغط حرف ى", false, GUIEditor.window[1]) 
        guiMemoSetReadOnly(GUIEditor.memo[1], true)     
    end 
) 
addEventHandler("onClientGUIClick",root, 
function () 
if source == GUIEditor.button[1] then 
 triggerServerEvent("onlogin",localPlayer,guiGetText( GUIEditor.edit[1]]),guiGetText( GUIEditor.edit[2])) 
elseif source == GUIEditor.button[2] then 
guiSetVisible(GUIEditor.window[1],false) 
showCursor(false) 
showChat(true) 
fadeCamera(true,5) 
elseif source == GUIEditor.button[3] then 
triggerServerEvent("onReg",localPlayer,getLocalPlayer(),guiGetText( GUIEditor.edit[1]),guiGetText( GUIEditor.edit[2]) ) 
end 
end 
) 
addEvent("Hidewindow",true) 
addEventHandler("Hidewindow",root, 
function () 
guiSetVisible(GUIEditor.window[1],false) 
showCursor(false) 
showChat(true) 
fadeCamera(true,5) 
end 
) 

Link to comment

-- كلينت جرب

GUIEditor = { 
    button = {}, 
    window = {}, 
    label = {}, 
    edit = {} 
} 
addEventHandler('onClientResourceStart', resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(318, 201, 392, 427, "~~ Real life الحياة الواقعية ~~", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
        guiSetAlpha(GUIEditor.window[1], 1.00) 
        showCursor(true) 
        showChat(false) 
        fadeCamera(false,5) 
        GUIEditor.button[1] = guiCreateButton(15, 356, 103, 61, "Login", false, GUIEditor.window[1]) 
        GUIEditor.button[3] = guiCreateButton(147, 356, 103, 61, "Register", false, GUIEditor.window[1]) 
        GUIEditor.button[2] = guiCreateButton(272, 356, 103, 61, "Guest", false, GUIEditor.window[1]) 
        GUIEditor.edit[1] = guiCreateEdit(102, 32, 244, 23, "", false, GUIEditor.window[1]) 
        GUIEditor.edit[2] = guiCreateEdit(102, 119, 244, 23, "", false, GUIEditor.window[1]) 
        GUIEditor.label[1] = guiCreateLabel(13, 35, 82, 30, "   UserName", false, GUIEditor.window[1]) 
        GUIEditor.label[2] = guiCreateLabel(15, 119, 82, 30, "   PassWord", false, GUIEditor.window[1])     
    end 
) 
addEventHandler('onClientGUIClick',resourceRoot, 
function () 
if source == GUIEditor.button[1] then 
user = guiGetText(GUIEditor.edit[1]) 
pass = guiGetText(GUIEditor.edit[2]) 
  triggerServerEvent('onlogin',localPlayer,user, pass) 
  elseif source == GUIEditor.button[2] then 
guiSetVisible(GUIEditor.window[1],false) 
showCursor(false) 
showChat(true) 
fadeCamera(true,5) 
elseif source == GUIEditor.button[3] then 
user = guiGetText(GUIEditor.edit[1]) 
pass = guiGetText(GUIEditor.edit[2]) 
triggerServerEvent('onReg',localPlayer,user, pass) 
end 
end 
) 
addEvent('Hidewindow',true) 
addEventHandler('Hidewindow',root, 
function () 
guiSetVisible(GUIEditor.window[1],false) 
showCursor(false) 
showChat(true) 
fadeCamera(true,5) 
end 
) 

--- سيرفر

addEvent('onlogin', true) 
addEventHandler('onlogin',root, 
    function (user, pass) 
        local account = getAccount ( user, pass ) 
    if ( account ~= true ) then 
        if (logIn ( source, account, pass ) == true) then 
            outputChatBox ( "You Logged in Sucessfuly!", source, 255, 255, 0 , true ) 
            triggerClientEvent (source, "Hidewindow", source) 
        else 
            outputChatBox ( "Login Error!", source, 255, 0, 0 ) 
        end 
    else 
        outputChatBox ( "Wrong username or password!", source, 255, 0, 0 ) 
    end 
    end 
) 
  
  
addEvent('onReg',true) 
addEventHandler('onReg',root, 
    function (user,pass) 
        local account = getAccount(user,pass) 
        if ( account ) then 
            outputChatBox("* This Account is Already Used",source,255,0,0) 
            triggerClientEvent (source, "Hidewindow", source) 
        else 
            addAccount(user,pass) 
            outputChatBox("UserName: " .. user .. " PassWord : " .. pass,source,0,150,255) 
            triggerClientEvent (source, "Hidewindow", source) 
        end 
    end 
) 
Edited by Guest
Link to comment
@ Max+ : بحدث الريجستر بسيرفر سايد مسوي زي اللي مسويه باللوغ أن ومن ثم حاط ريجستر !!

والله شف انا اضبط بالكلينت سايد باللوحات

لاكن بالنسبة لاضافة حسابات او دخول

خبرتي قليله

. . . .

هو كان عنده خطأ

مسوي user, pass

بس

ماهو حاطها في الكلينت سايد

Link to comment
حلو تسجيل دخول اشتغل بس

عمل حساب جديد register

مو شغال

:(

طيب اصبر لي شوي خلني امخمخ عليه لاني والله

نص تركيز معي

وليه تفتح 20 موضوع

لاتزود مواضيع عشان ماتتقفل . . .

Link to comment

معاك حق الشي يبي له مخمخة .. :lol::lol:

: .. بسيرفر سايد الى onReg استبدل حدث

addEvent ( "onReg", true ) 
addEventHandler ( "onReg", root, function ( user, pass ) 
    if ( user and pass and type ( user ) == "string" and type ( pass ) == "string" ) then 
        local account = getAccount ( user ) 
        if ( not account ) then 
            local account = addAccount ( user, pass ) 
            if ( account ) then 
                if ( not logIn ( source, account, pass ) ) then 
                    return outputChatBox ( "Login Error!", source, 255, 0, 0 ) 
                end 
                triggerClientEvent ( source, "Hidewindow", source ) 
            else 
                 return outputChatBox ( "Register Error !", source, 255, 0, 0 ) 
             end 
        else 
             return outputChatBox ( "Account is registered", source, 255, 0, 0 ) 
           end 
      end 
    return false 
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...