Es.getplayername
From EventScripts Community Encyclopedia
|
[edit] Method: getplayernameModule: es [edit] Method Overview[edit] Table of Contents
[edit] DescriptionStores the user's name in the variable specified. [edit] Arguments
[edit] Examplesimport es def load(): es.regsaycmd('!name', 'script/name') def name(): user = es.getcmduserid() name = es.getplayername(user) es.msg('Your name is', name) When the player says !name it will run the function 'name', find their userid store it in a variable, get their name and store it in a variable and print "Your name is <name> " in the chatbox. [edit] NotesIt is recommended that you use es.exists() to check if the userid does in fact exist [edit] See Also |
|
