Jump to content

طلب واحد


kolme2

Recommended Posts

السلام عليكم

ممكن

كود التسجيل والدخول لـ الشوب

هذا شي الوحيد اللي باقي لي

client.lua

onlogin اسم زر الددخول

onre اسم زر التسجيل

تأكد من guiGetText(user)

و

guiGetText(pass)

--هذا الأيدت حق الأسم والباس

  
function onGuiClick (button, state, absoluteX, absoluteY) 
    if (source == onlogin) then 
        triggerServerEvent ( "onlogin", getRootElement(), getLocalPlayer(), guiGetText(user), guiGetText(pass) ) 
    elseif (source == onre) then 
        triggerServerEvent ( "onreg", getRootElement(), getLocalPlayer(), guiGetText(user), guiGetText(pass) ) 
    end  
end  
addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) 
  

server.lua

  
  
addEvent("onlogin", true) 
addEventHandler("onlogin",getRootElement(), 
    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 With User : #00FF00[ " .. user .. " ]!", player, 255, 255, 0 , true ) 
        else 
            outputChatBox ( "Login error!", player, 255, 255, 0 ) 
        end 
    else 
        outputChatBox ( "Wrong username or password!", player, 255, 255, 0 ) 
    end 
    end 
) 
  
addEvent("onreg", true) 
addEventHandler("onreg",getRootElement(), 
    function ( player, user, pass ) 
        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 ) 
        else 
            outputChatBox ( "You Are Already Logged in !", player, 255, 255, 0 ) 
        end 
    else 
        account = addAccount ( user, pass ) 
        if (logIn ( player, account, pass ) == true) then 
            outputChatBox ( "You Registerd and Logged in Sucessfuly - Please Remember Your User/Password!", player, 255, 255, 0 ) 
            outputChatBox ( "Register Details : [ Username ] : #00FF00" .. user .. " #FFFF1A[ Password ] : #00FF00" .. pass .. "", player, 255, 255, 0 , true ) 
        else 
            outputChatBox ( "Register/Login error!", player, 255, 255, 0 ) 
        end 
    end 
end 
) 

Link to comment
طيب وين اسم التاب ؟

التاب انت تكون مسويه وجاهز وكل شي

مافيه اسم التاب بس اسم زر التسجيل واسم زر الدخول

و edit

الأيديت اللي تكتب فيه الأسم والباس

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