Es getplayername

From EventScripts Community Encyclopedia

Overview

Syntax: es_getplayername <variable> <userid>

Note: Command parameters are described inside the < and > characters. Optional parameters are contained within [ and ] characters.

Variation of this command that doesn't expand variables: es_xgetplayername

Description

Stores the user's name in the variable specified.

Parameters

  • variable - Variable which will store the player's name
  • userid - User id of the player


Examples

// Get the player's name and display it to everyone
es_xsetinfo playername 0
es_getplayername playername event_var(userid)
es_msg Say hello to server_var(playername)


Notes

  • The server could crash if the provieded userid does not exists!
  • variable will equal 0 if the player does not exist.


See also

blog comments powered by Disqus