Jump to content

Login Panel v1


franku

Recommended Posts

guys i made a login panel and this is my first script i didn't know what i did exactly can somedoby help me to get knowledge about my script?

and did i need mtasa to test it?

this login panel scripted in MTA Script Editor.

TbcUrSN.png?1

please add me in skype: adward.rody

Thanks.

Link to comment
function loginPlayer ( thePlayer, command, username, password ) 
    local account = getAccount ( username, password )  
        if ( account ~= false )   
            logIn ( thePlayer, account, password )  
             
            outputChatBox ( "Wrong username or password!", thePlayer, 255, 255, 0 )  
        end 
end 
addCommandHandler ( "log-in", loginPlayer ) 
addEventHandler("onPlayerJoin",root,function() 
    if getAccount(getPlayerName(source)) then 
        outputChatBox("Please Login!",source) 
    else 
        outputChatBox("Please Register!",source) 
    end 
end) 
function callAdmin ( playerSource ) 
     
    sourceAccount = getPlayerAccount ( playerSource ) 
     
    if isGuestAccount ( sourceAccount ) then 
         
        outputConsole ( "Please register to use this function!", playerSource ) 
    else 
         
    end 
end 
  
addCommandHandler ( "call_admin", callAdmin ) 

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