Jump to content

getplayerAccountBySerial


itHyperoX

Recommended Posts

want to make something like this

but i want the player account name by serial , not the serial :D 

addCommandHandler("getaccserial", 
function (player, cmd, accountName)
        if accountName then 
         local account = getAccount(accountName)
            if (account) then
                outputChatBox("The serial is " .. getAccountSerial(account),player,255,255,255,true)
            else
                outputChatBox("Account not found")
            end
        end
end)

 

Link to comment

oh yes, i didn't see that.

So i tried to make command for that

error

getAccountsBySerial expected string at argument 1 got nil

 

function GetAccountNameFromSerial(serial)
    local accounts = getAccountsBySerial(serial)
    if accounts then
        for _,v in pairs(accounts) do
            outputChatBox(getAccountName(v))
        end
    end
end
addCommandHandler("tes",GetAccountNameFromSerial)

 

Link to comment
function GetAccountNameFromSerial(player,  serial)
    local accounts = getAccountsBySerial(serial)
    if accounts then
        for _,v in pairs(accounts) do
            outputChatBox(getAccountName(v))
        end
    end
end
addCommandHandler("tes",GetAccountNameFromSerial)

 

Link to comment

even that is wrong.

 

function GetAccountNameFromSerial(player, cmd,  serial)
    local accounts = getAccountsBySerial(serial)
    if accounts then
        for _,v in pairs(accounts) do
            outputChatBox(getAccountName(v))
        end
    end
end
addCommandHandler("tes",GetAccountNameFromSerial)

 

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