pepsi18 Posted June 5, 2014 Posted June 5, 2014 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
-.Paradox.- Posted June 5, 2014 Posted June 5, 2014 getAccountName is a Server side function, Your code is client side.
Max+ Posted June 5, 2014 Posted June 5, 2014 (edited) test the triggerSideEvent, didn't work , because the text , of the dxdraw , i think , you must use , getElementData setElementData Edited June 5, 2014 by Guest
-.Paradox.- Posted June 5, 2014 Posted June 5, 2014 you Need , to Use triggerServerEvent it's esair than triggering form server to client . Good Luck , I don't think it will help...(no offence)
xXMADEXx Posted June 5, 2014 Posted June 5, 2014 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" )
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now