Jump to content

طلب تعديل على مود


EH10

Recommended Posts

ابي تعدلون على هاذا

اذا ممكن تخلونة يقدر يسجل واذا مكرر التسجيل يقول هاذا الحساب موجود واذا سوا حساب لقد عملت حساب جديد واذا سجل دخول لقد سجلت دخول واذا مافي مثل كذا حساب يقول هاذا الحساب ليس موجود واذا سجل يقول حياك لقد سجلت

كلينت

wind = guiCreateWindow(0, 0, 0, 0, "", false) 
reg = guiCreateEdit(0, 0, 0, 0, "", false, winds) 
pass2 = guiCreateEdit(0, 0, 0, 0, "", false, winds) 
register = guiCreateButton(0, 0, 0, 0, "register", false, winds) 
name = guiCreateEdit(0, 0, 0, 0, "", false, winds) 
pass = guiCreateEdit(0, 0, 0, 0, "", false, winds) 
login = guiCreateButton(0, 0, 0, 0, "lgoin", false, winds) 
  
  
addEventHandler("onClientGUIClick",getRootElement(), 
    function () 
        local user = guiGetText(name) 
        local pass = guiGetText(pass) 
        if ( source == login ) then 
            triggerServerEvent("onlogin",getLocalPlayer(),user,pass) 
        elseif ( source == register ) then 
            triggerServerEvent("onre",getLocalPlayer(),user,pass) 
        end 
    end 
) 

سيرفر

addEvent("onlogin",true) 
addEventHandler("onlogin",getRootElement(), 
    function (user,pass) 
        local account = getAccount(user,pass) 
        if ( account ) then 
            logIn(source,account,pass) 
            triggerClientEvent(source,"setcol",source) 
        else 
            outputChatBox("* Worng Username Or Password",source,255,0,0) 
        end 
    end 
) 
  
addEvent("onre",true) 
addEventHandler("onre",getRootElement(), 
    function (user,pass) 
        local account = getAccount(user,pass) 
        if ( account ) then 
            outputChatBox("* This Account is Already Used",source,255,0,0) 
        else 
            addAccount(user,pass) 
            outputChatBox("UserName: " .. user .. " PassWord : " .. pass,source,0,150,255) 
        end 
    end 
) 
Link to comment
    addEvent("onlogin", true) 
    addEventHandler("onlogin",root, 
        function (player, user, pass ) 
            local account = getAccount ( user, pass ) 
        if ( account ~= true ) then 
            if (logIn ( player, account, pass ) == true) then 
                outputChatBox ( "* You Logged in Sucessfuly!", player, 250, 150, 0 , true ) 
                triggerClientEvent (source, "setcol", source) 
            else 
                outputChatBox ( "* Login Error!", player, 255, 0, 0 ) 
            end 
        else 
            outputChatBox ( "* Worng Username Or Password", player, 255, 0, 0 ) 
           end 
     end 
) 
  
  
    addEvent("onre", true) 
    addEventHandler("onre",root, 
        function ( player, user, pass  ) 
            local account = getAccount ( user, pass ) 
        if ( account ~= true ) then 
            outputChatBox("* This Account is Already Used",player,255,0,0) 
            if ( account ~= false ) then 
            if (logIn ( player, account, pass ) == true) then 
                outputChatBox ( "* You Registerd and Logged in Sucessfuly", player, 250, 150, 0 ) 
                outputChatBox("UserName: " .. user .. " PassWord : " .. pass,source,0,150,255) 
            else 
                outputChatBox ( "You Are Already Logged in !", player, 250, 150, 0 ) 
            end 
        else 
            account = addAccount ( user, pass ) 
            if (logIn ( player, account, pass ) == true) then 
                outputChatBox ( "You Registerd and Logged in Sucessfuly!", player, 250, 150, 0 ) 
            else 
                outputChatBox ( "Register Error !", player, 255, 0, 0 ) 
            end 
        end 
    end 
    ) 

جربه

Edited by Guest
Link to comment
    addEvent("onlogin", true) 
    addEventHandler("onlogin",root, 
        function (player, user, pass ) 
            local account = getAccount ( user, pass ) 
        if ( account ~= true ) then 
            if (logIn ( player, account, pass ) == true) then 
                outputChatBox ( "* You Logged in Sucessfuly!", player, 250, 150, 0 , true ) 
                triggerClientEvent (source, "setcol", source) 
            else 
                outputChatBox ( "* Login Error!", player, 255, 0, 0 ) 
            end 
        else 
            outputChatBox ( "* Worng Username Or Password", player, 255, 0, 0 ) 
           end 
     end 
) 
  
  
    addEvent("onre", true) 
    addEventHandler("onre",root, 
        function ( player, user, pass  ) 
            local account = getAccount ( user, pass ) 
        if ( account == true ) then 
            outputChatBox("* This Account is Already Used",player,255,0,0) 
            if ( account ~= false ) then 
            if (logIn ( player, account, pass ) == true) then 
                outputChatBox ( "* You Registerd and Logged in Sucessfuly", player, 250, 150, 0 ) 
                outputChatBox("UserName: " .. user .. " PassWord : " .. pass,source,0,150,255) 
            else 
                outputChatBox ( "You Are Already Logged in !", player, 250, 150, 0 ) 
            end 
        else 
            account = addAccount ( user, pass ) 
            if (logIn ( player, account, pass ) == true) then 
                outputChatBox ( "You Registerd and Logged in Sucessfuly!", player, 250, 150, 0 ) 
            else 
                outputChatBox ( "Register Error !", player, 255, 0, 0 ) 
            end 
        end 
    end 
    ) 

جربه

ماضبط

Link to comment
    addEvent("onlogin", true) 
    addEventHandler("onlogin",root, 
        function (player, user, pass ) 
            local account = getAccount ( user, pass ) 
        if ( account ~= true ) then 
            if (logIn ( player, account, pass ) == true) then 
                outputChatBox ( "* You Logged in Sucessfuly!", player, 250, 150, 0 , true ) 
                triggerClientEvent (source, "setcol", source) 
            else 
                outputChatBox ( "* Login Error!", player, 255, 0, 0 ) 
            end 
        else 
            outputChatBox ( "* Worng Username Or Password", player, 255, 0, 0 ) 
           end 
     end 
) 
  
  
    addEvent("onre", true) 
    addEventHandler("onre",root, 
        function ( player, user, pass  ) 
            local account = getAccount ( user, pass ) 
        if ( account == true ) then 
            outputChatBox("* This Account is Already Used",player,255,0,0) 
            if ( account ~= false ) then 
            if (logIn ( player, account, pass ) == true) then 
                outputChatBox ( "* You Registerd and Logged in Sucessfuly", player, 250, 150, 0 ) 
                outputChatBox("UserName: " .. user .. " PassWord : " .. pass,source,0,150,255) 
            else 
                outputChatBox ( "You Are Already Logged in !", player, 250, 150, 0 ) 
            end 
        else 
            account = addAccount ( user, pass ) 
            if (logIn ( player, account, pass ) == true) then 
                outputChatBox ( "You Registerd and Logged in Sucessfuly!", player, 250, 150, 0 ) 
            else 
                outputChatBox ( "Register Error !", player, 255, 0, 0 ) 
            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...