Jump to content

help draw account


pepsi18

Recommended Posts

as I can do to draw the user name

someone help plis

client

function draw() 
 dxDrawText(owner, x*348, y*350, 391, 435, tocolor(255,255,255, 252), 0.87*y, "bankgothic", "left", "top", false, false, true, false, false) 
 end 

server

  
 function user () 
 local owner = getAccountName(getPlayerAccount( source ) )  
 end 

Link to comment

You should do something like this:

-- server 
addEventHandler ( "onPlayerJoin", root, function ( ) 
    setElementData ( source, "AccountUsername", "" ) 
end ) 
  
addEventHandler ( "onPlayerLogin", root, function ( _, a ) 
    setElementData ( source, "AccountUsername", getAccountName ( a ) ) 
end ) 
  
  
  
-- client 
owner = getElementData ( localPlayer, "AccountUsername" ) 

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