Jump to content

account name problem


Castillo

Recommended Posts

hey again, i have a problem genting the account name of the player selected from a grid list, before it just returned the player nick but now just outputs a warning at debug script, here is my code.

server

function update(client)
local who = getPlayerFromName (client)
local account = getAccount (client)
triggerClientEvent ( "updateGuis", getRootElement(), getPlayerIP ( who ), getPlayerSerial ( who ), getAccountName ( account ), getPlayerMoney ( who ), getPlayerPing ( who ) )
end
addEvent("updateGui", true)
addEventHandler("updateGui", getRootElement(), update)

those other stuff is working fine, just account name dosnt work.

Link to comment

Are you sure that account name is not the same as player name? Usually when players register they register with their name so account name will be the same as their name.

Also, you use getAccount and use player's name for username (which is the account name) and then you getAccountName (of the account that you know the name already). Use getPlayerAccount instead:

local who = getPlayerFromName (client);
local account = getPlayerAccount( who );

Link to comment
Are you sure that account name is not the same as player name? Usually when players register they register with their name so account name will be the same as their name.

Also, you use getAccount and use player's name for username (which is the account name) and then you getAccountName (of the account that you know the name already). Use getPlayerAccount instead:

local who = getPlayerFromName (client);
local account = getPlayerAccount( who );

yea! finally works, thank you so much!

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