Jump to content

مشكلة في لوحة تسجيل ي ليت الحل


Recommended Posts

بسم الله الرحمن الرحيم وصلاة وسلام على اشرف خلق الله

اما بعد

لدي مشكلة في لوحة تسجيل

صممت لوحة تسجيل دخول وكل شي وزبط الامور ونسخة الاكواد لربطها مع لوحة تسجيل

وعندي م خلصت كل شي ذهبت الى سيرفر وشغلت المود وعندي كتابة اسم الحساب او يقول لي error login و error register

وراح اطرح الاكواد لوحتي وي ليت من شباب حلها ورسال لوحة في الخاص او هنا ومشكورين على كل شي

ببداء بطرحها

الــــــــــــــــ Client

  
GUIEditor = { 
    button = {}, 
    edit = {}, 
    label = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        malek505 = guiCreateWindow(138, 112, 769, 577, "× = [ Login / Register ] = ×", false) 
        guiWindowSetSizable(malek505, false) 
        guiSetAlpha(malek505, 1.00) 
        guiSetProperty(malek505, "CaptionColour", "FF00A1FF") 
  
        GUIEditor.label[1] = guiCreateLabel(214, 37, 312, 50, "×حيآإكم الله في سيرفر سعودي زومبي×\n×يجب عليك تسجيل لحف الوقت والفلوس واللفل×\n×شكرا لك على اختيار سيرفرنا×", false, malek505) 
        guiSetFont(GUIEditor.label[1], "default-bold-small") 
        guiLabelSetColor(GUIEditor.label[1], 245, 255, 0) 
        guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) 
        guiLabelSetVerticalAlign(GUIEditor.label[1], "center") 
        GUIEditor.label[2] = guiCreateLabel(16, 46, 133, 47, " [ S.Z ]", false, malek505) 
        guiSetFont(GUIEditor.label[2], "sa-header") 
        guiLabelSetHorizontalAlign(GUIEditor.label[2], "center", false) 
        GUIEditor.label[3] = guiCreateLabel(617, 47, 133, 47, " [ S.Z ]", false, malek505) 
        guiSetFont(GUIEditor.label[3], "sa-header") 
        guiLabelSetHorizontalAlign(GUIEditor.label[3], "center", false) 
        GUIEditor.edit[1] = guiCreateEdit(9, 104, 751, 15, "", false, malek505) 
        guiEditSetReadOnly(GUIEditor.edit[1], true) 
        GUIEditor.label[4] = guiCreateLabel(180, 209, 60, 15, "UserName", false, malek505) 
        guiSetFont(GUIEditor.label[4], "default-bold-small") 
        GUIEditor.edit[2] = guiCreateEdit(250, 209, 240, 17, "", false, malek505) 
        GUIEditor.label[5] = guiCreateLabel(180, 262, 60, 15, "PassWord", false, malek505) 
        guiSetFont(GUIEditor.label[5], "default-bold-small") 
        GUIEditor.edit[3] = guiCreateEdit(250, 262, 240, 17, "", false, malek505) 
        GUIEditor.button[1] = guiCreateButton(97, 369, 163, 28, "Login .. =>", false, malek505) 
        GUIEditor.button[2] = guiCreateButton(307, 369, 163, 28, "<=..Play Gust .. =>", false, malek505) 
        GUIEditor.button[3] = guiCreateButton(528, 369, 163, 28, "<= .. Register", false, malek505) 
        GUIEditor.edit[4] = guiCreateEdit(9, 440, 750, 15, "", false, malek505) 
        GUIEditor.label[6] = guiCreateLabel(231, 518, 269, 18, "قال الله تعال \"{SMILIES_PATH}/icon_sad.gif\" alt=\"\" title=\"Sad\" />( مَا يَلْفِظُ مِنْ قَوْلٍ إِلَّا لَدَيْهِ رَقِيبٌ عَتِيدٌ))", false, malek505)     
    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(malek505,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(malek505,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
وين الخبراء والمبرمجين

لا تنتظر رد سرييع لأن كـــودك مب ســهل ييعني المبرمج ما رح يسويلك اياه

على السريع لأن الغلط في سطر معين و لازم يشيك بالسيرفر و الكلنت :!:

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 ) 

يعني يسير كذا

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

بالكلنت

بدل سطر 4 بهذا

triggerServerEvent("onLogin",getLocalPlayer(),guiGetText(GUIEditor.edit[2]),guiGetText(GUIEditor.edit[3]) 

وبدل سطر 11 بهذا

triggerServerEvent("onReg",getLocalPlayer(),guiGetText(GUIEditor.edit[2]),guiGetText(GUIEditor.edit[3]) ) 

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 ) 

يعني يسير كذا

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

رد خبر

ي خوي بدلتها وجيت ادخل المود لسيرفر يقول couldnot script login-register ...

Link to comment
بالكلنت

بدل سطر 4 بهذا

triggerServerEvent("onLogin",getLocalPlayer(),guiGetText(GUIEditor.edit[2]),guiGetText(GUIEditor.edit[3]) 

وبدل سطر 11 بهذا

triggerServerEvent("onReg",getLocalPlayer(),guiGetText(GUIEditor.edit[2]),guiGetText(GUIEditor.edit[3]) ) 

جاري تجربة

Link to comment
بالكلنت

بدل سطر 4 بهذا

triggerServerEvent("onLogin",getLocalPlayer(),guiGetText(GUIEditor.edit[2]),guiGetText(GUIEditor.edit[3]) 

وبدل سطر 11 بهذا

triggerServerEvent("onReg",getLocalPlayer(),guiGetText(GUIEditor.edit[2]),guiGetText(GUIEditor.edit[3]) ) 

جاري تجربة

اخي حاولت م زبط

طيب ي ليت تعطيني فكرة على الكود الي طرحته فوك وتقول وين بدلت مكانه

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

Link to comment

شوف كودك اللي طرحته فوق

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(malek505,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(malek505,false) 
showCursor(false) 
showChat(true) 
fadeCamera(true,5) 
end 
) 

الخطا بالتريقر باخر سطر 4 ونفس الشي بسطر 11 اللي هو

guiGetText(GUIEditor.edit[1]) -- لليوزر

guiGetText(GUIEditor.edit[2]) -- للباس

والصحيح

guiGetText(GUIEditor.edit[2]) -- لليوزر

guiGetText(GUIEditor.edit[3]) -- للباس

على كل حال بعطيك الاكواد وجربها

-- Client -- 
  
GUIEditor = { 
    button = {}, 
    edit = {}, 
    label = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        malek505 = guiCreateWindow(138, 112, 769, 577, "× = [ Login / Register ] = ×", false) 
        guiWindowSetSizable(malek505, false) 
        guiSetAlpha(malek505, 1.00) 
        guiSetProperty(malek505, "CaptionColour", "FF00A1FF") 
  
        GUIEditor.label[1] = guiCreateLabel(214, 37, 312, 50, "×حيآإكم الله في سيرفر سعودي زومبي×\n×يجب عليك تسجيل لحف الوقت والفلوس واللفل×\n×شكرا لك على اختيار سيرفرنا×", false, malek505) 
        guiSetFont(GUIEditor.label[1], "default-bold-small") 
        guiLabelSetColor(GUIEditor.label[1], 245, 255, 0) 
        guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) 
        guiLabelSetVerticalAlign(GUIEditor.label[1], "center") 
        GUIEditor.label[2] = guiCreateLabel(16, 46, 133, 47, " [ S.Z ]", false, malek505) 
        guiSetFont(GUIEditor.label[2], "sa-header") 
        guiLabelSetHorizontalAlign(GUIEditor.label[2], "center", false) 
        GUIEditor.label[3] = guiCreateLabel(617, 47, 133, 47, " [ S.Z ]", false, malek505) 
        guiSetFont(GUIEditor.label[3], "sa-header") 
        guiLabelSetHorizontalAlign(GUIEditor.label[3], "center", false) 
        GUIEditor.edit[1] = guiCreateEdit(9, 104, 751, 15, "", false, malek505) 
        guiEditSetReadOnly(GUIEditor.edit[1], true) 
        GUIEditor.label[4] = guiCreateLabel(180, 209, 60, 15, "UserName", false, malek505) 
        guiSetFont(GUIEditor.label[4], "default-bold-small") 
        GUIEditor.edit[2] = guiCreateEdit(250, 209, 240, 17, "", false, malek505) 
        GUIEditor.label[5] = guiCreateLabel(180, 262, 60, 15, "PassWord", false, malek505) 
        guiSetFont(GUIEditor.label[5], "default-bold-small") 
        GUIEditor.edit[3] = guiCreateEdit(250, 262, 240, 17, "", false, malek505) 
        GUIEditor.button[1] = guiCreateButton(97, 369, 163, 28, "Login .. =>", false, malek505) 
        GUIEditor.button[2] = guiCreateButton(307, 369, 163, 28, "<=..Play Gust .. =>", false, malek505) 
        GUIEditor.button[3] = guiCreateButton(528, 369, 163, 28, "<= .. Register", false, malek505) 
        GUIEditor.edit[4] = guiCreateEdit(9, 440, 750, 15, "", false, malek505) 
        GUIEditor.label[6] = guiCreateLabel(231, 518, 269, 18, "قال الله تعال \"{SMILIES_PATH}/icon_sad.gif\" alt=\"\" title=\"Sad\" />( مَا يَلْفِظُ مِنْ قَوْلٍ إِلَّا لَدَيْهِ رَقِيبٌ عَتِيدٌ))", false, malek505)     
    end 
) 
  
addEventHandler("onClientGUIClick",root, 
function () 
if source == GUIEditor.button[1] then 
triggerServerEvent("onLogin",getLocalPlayer(),guiGetText(GUIEditor.edit[2]),guiGetText(GUIEditor.edit[3]) ) 
elseif source == GUIEditor.button[2] then 
guiSetVisible(malek505,false) 
showCursor(false) 
showChat(true) 
fadeCamera(true,5) 
elseif source == GUIEditor.button[3] then 
triggerServerEvent("onReg",getLocalPlayer(),guiGetText(GUIEditor.edit[2]),guiGetText(GUIEditor.edit[3])) 
end 
end 
) 
addEvent("Hidewindow",true) 
addEventHandler("Hidewindow",root, 
function () 
guiSetVisible(malek505,false) 
showCursor(false) 
showChat(true) 
fadeCamera(true,5) 
end 
) 

-- Server -- 
  
addEvent("onLogin", true) 
addEventHandler("onLogin",root, 
    function (user, pass) 
        local account = getAccount ( user, pass ) 
        local acc = getPlayerAccount(source) 
        if (isGuestAccount(acc)) then 
        if (account) then 
           logIn(source,account,pass) 
           outputChatBox ( "You Successfully Logged in !", source, 255, 255, 0 , true ) 
           triggerClientEvent (source, "Hidewindow", source) 
        else 
            outputChatBox ( "Wrong username or password !", source, 255, 0, 0 , true) 
        end 
    else 
        outputChatBox ( "You Are Already Logged in !", source, 255, 255, 0 , true ) 
        triggerClientEvent (source, "Hidewindow", source)        
    end 
 end 
) 
  
  
addEvent("onReg", true) 
addEventHandler("onReg",root, 
    function ( user, pass ) 
        local account = getAccount ( user, pass ) 
        local acc = getPlayerAccount(source) 
        if (isGuestAccount(acc)) then 
        if not (account) then 
           addAccount(user,pass) 
           outputChatBox ( "You have Successfully Registered !", source, 255, 255, 0 , true) 
      else 
           outputChatBox ( "This account allready exists !", source, 255, 255, 0 , true) 
      end 
  else    
        outputChatBox ( "Register Error !", source, 255, 0, 0 , true) 
        triggerClientEvent (source, "Hidewindow", source) 
     end 
 end 
) 

Link to comment
شوف كودك اللي طرحته فوق
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(malek505,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(malek505,false) 
showCursor(false) 
showChat(true) 
fadeCamera(true,5) 
end 
) 

الخطا بالتريقر باخر سطر 4 ونفس الشي بسطر 11 اللي هو

guiGetText(GUIEditor.edit[1]) -- لليوزر

guiGetText(GUIEditor.edit[2]) -- للباس

والصحيح

guiGetText(GUIEditor.edit[2]) -- لليوزر

guiGetText(GUIEditor.edit[3]) -- للباس

على كل حال بعطيك الاكواد وجربها

-- Client -- 
  
GUIEditor = { 
    button = {}, 
    edit = {}, 
    label = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        malek505 = guiCreateWindow(138, 112, 769, 577, "× = [ Login / Register ] = ×", false) 
        guiWindowSetSizable(malek505, false) 
        guiSetAlpha(malek505, 1.00) 
        guiSetProperty(malek505, "CaptionColour", "FF00A1FF") 
  
        GUIEditor.label[1] = guiCreateLabel(214, 37, 312, 50, "×حيآإكم الله في سيرفر سعودي زومبي×\n×يجب عليك تسجيل لحف الوقت والفلوس واللفل×\n×شكرا لك على اختيار سيرفرنا×", false, malek505) 
        guiSetFont(GUIEditor.label[1], "default-bold-small") 
        guiLabelSetColor(GUIEditor.label[1], 245, 255, 0) 
        guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) 
        guiLabelSetVerticalAlign(GUIEditor.label[1], "center") 
        GUIEditor.label[2] = guiCreateLabel(16, 46, 133, 47, " [ S.Z ]", false, malek505) 
        guiSetFont(GUIEditor.label[2], "sa-header") 
        guiLabelSetHorizontalAlign(GUIEditor.label[2], "center", false) 
        GUIEditor.label[3] = guiCreateLabel(617, 47, 133, 47, " [ S.Z ]", false, malek505) 
        guiSetFont(GUIEditor.label[3], "sa-header") 
        guiLabelSetHorizontalAlign(GUIEditor.label[3], "center", false) 
        GUIEditor.edit[1] = guiCreateEdit(9, 104, 751, 15, "", false, malek505) 
        guiEditSetReadOnly(GUIEditor.edit[1], true) 
        GUIEditor.label[4] = guiCreateLabel(180, 209, 60, 15, "UserName", false, malek505) 
        guiSetFont(GUIEditor.label[4], "default-bold-small") 
        GUIEditor.edit[2] = guiCreateEdit(250, 209, 240, 17, "", false, malek505) 
        GUIEditor.label[5] = guiCreateLabel(180, 262, 60, 15, "PassWord", false, malek505) 
        guiSetFont(GUIEditor.label[5], "default-bold-small") 
        GUIEditor.edit[3] = guiCreateEdit(250, 262, 240, 17, "", false, malek505) 
        GUIEditor.button[1] = guiCreateButton(97, 369, 163, 28, "Login .. =>", false, malek505) 
        GUIEditor.button[2] = guiCreateButton(307, 369, 163, 28, "<=..Play Gust .. =>", false, malek505) 
        GUIEditor.button[3] = guiCreateButton(528, 369, 163, 28, "<= .. Register", false, malek505) 
        GUIEditor.edit[4] = guiCreateEdit(9, 440, 750, 15, "", false, malek505) 
        GUIEditor.label[6] = guiCreateLabel(231, 518, 269, 18, "قال الله تعال \"{SMILIES_PATH}/icon_sad.gif\" alt=\"\" title=\"Sad\" />( مَا يَلْفِظُ مِنْ قَوْلٍ إِلَّا لَدَيْهِ رَقِيبٌ عَتِيدٌ))", false, malek505)     
    end 
) 
  
addEventHandler("onClientGUIClick",root, 
function () 
if source == GUIEditor.button[1] then 
triggerServerEvent("onLogin",getLocalPlayer(),guiGetText(GUIEditor.edit[2]),guiGetText(GUIEditor.edit[3]) ) 
elseif source == GUIEditor.button[2] then 
guiSetVisible(malek505,false) 
showCursor(false) 
showChat(true) 
fadeCamera(true,5) 
elseif source == GUIEditor.button[3] then 
triggerServerEvent("onReg",getLocalPlayer(),guiGetText(GUIEditor.edit[2]),guiGetText(GUIEditor.edit[3])) 
end 
end 
) 
addEvent("Hidewindow",true) 
addEventHandler("Hidewindow",root, 
function () 
guiSetVisible(malek505,false) 
showCursor(false) 
showChat(true) 
fadeCamera(true,5) 
end 
) 

-- Server -- 
  
addEvent("onLogin", true) 
addEventHandler("onLogin",root, 
    function (user, pass) 
        local account = getAccount ( user, pass ) 
        local acc = getPlayerAccount(source) 
        if (isGuestAccount(acc)) then 
        if (account) then 
           logIn(source,account,pass) 
           outputChatBox ( "You Successfully Logged in !", source, 255, 255, 0 , true ) 
           triggerClientEvent (source, "Hidewindow", source) 
        else 
            outputChatBox ( "Wrong username or password !", source, 255, 0, 0 , true) 
        end 
    else 
        outputChatBox ( "You Are Already Logged in !", source, 255, 255, 0 , true ) 
        triggerClientEvent (source, "Hidewindow", source)        
    end 
 end 
) 
  
  
addEvent("onReg", true) 
addEventHandler("onReg",root, 
    function ( user, pass ) 
        local account = getAccount ( user, pass ) 
        local acc = getPlayerAccount(source) 
        if (isGuestAccount(acc)) then 
        if not (account) then 
           addAccount(user,pass) 
           outputChatBox ( "You have Successfully Registered !", source, 255, 255, 0 , true) 
      else 
           outputChatBox ( "This account allready exists !", source, 255, 255, 0 , true) 
      end 
  else    
        outputChatBox ( "Register Error !", source, 255, 0, 0 , true) 
        triggerClientEvent (source, "Hidewindow", source) 
     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...