Es getcmduserid

From EventScripts Community Encyclopedia


Overview

Syntax: es_getcmduserid <cvar>

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_xgetcmduserid

Description

Returns the userid of the player who issued a say/client command.

Parameters

  • cvar - This is the cvar which should hold the userid of the player.

Examples

block load
{
   // Create a say hook.
   es_regsaycmd omg omg/omg "OMGz0rz!"
}
block omg
{
   // Get the userid of the speaker.
   es_setinfo speaker 0
   es_getcmduserid speaker
 
   es_tell server_var(speaker) OMGz0rz!! He so hax!!!
}

Notes

  • This command only works in a block called by es_regsaycmd or es_regclientcmd.
  • This returns the userid of the person who issued the command.

See also

blog comments powered by Disqus