Es.getcmduserid

From EventScripts Community Encyclopedia



Method: getcmduserid

Module: es
Class: (no class)
EventScripts version: 2.0

Method Overview

Table of Contents

Contents


Description

Returns the userid of the player who issued a say/client command
This is the Python equivalent of: http://www.eventscripts.com/pages/es_getcmduserid

Arguments

es.getcmduserid()


Examples

import es
def load():
        es.regsaycmd('!name', 'script/name')
def name():
        user = es.getcmduserid() 
        name = es.getplayername(user) 
        es.msg('Your name is', name)

Prints the name of the player who said "!name"

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