Example:
local experience = 0 -- Define global variable
Now, in your trigger, you are sending the experience value, so, you must add the argument in the client side function:
addEvent ( "onTestExp", true )
addEventHandler ( "onTestExp", root,
function ( expe ) -- Here you are defining an argument, in this case, the value is what is sent from the server side.
end
)
So, all what you have to do next is set the "experience" variable value, which you can do it like this:
experience = expe
After that, you add the event handler to render it, and in dxDrawText you use "experience" variable instead of "X".