Jump to content

[HELP]Account Info


xXMADEXx

Recommended Posts

Hey guys, i am trying to make a command so if someone type /accountinfo that it will outputChatBox there username and password, i got this script below

--server

function accountinfo ( username, password ) 
    local account = getAccount ( username, password ) 
        if (account == false) then 
        outputChatBox("#00FF00Login-System: Your Username is: #FFFF00" .. username .. "#00FF00, And your Password is: #FFFF00" .. password .. "#00FF00!",255,255,255,true ) 
    elseif (account == true) then 
        outputChatBox("#00FF00Login-System: Your Username is: #FFFF00" .. username .. "#00FF00, And your Password is: #FFFF00" .. password .. "#00FF00!",255,255,255,true ) 
    end 
end 
addCommandHandler("accountinfo", accountinfo ) 

Link to comment

This code makes totally no sense.

addCommandHandler( "accountinfo", 
    function( player, command ) 
        if ( isGuestAccount( getPlayerAccount( player ) ) ) then 
            outputChatBox( "You are not logged in!", player, 255, 0, 0, false ); 
            return false; 
        end 
         
        outputChatBox( "Your account's username is: " .. getAccountName( getPlayerAccount( player ) ), player, 255, 255, 255, false ); 
    end 
) 

I guess you can't get account passwords with default MTA account system.

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