Es.cexec

From EventScripts Community Encyclopedia
This article is a stub. Please help by adding to it.



Method: cexec

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

Method Overview

Table of Contents

Contents


Description

Forces the provided userid to run a client-side command. This is the Python equivalent of: http://www.eventscripts.com/pages/es_cexec

Arguments

  • userid - Userid of the client who is running the command
  • command - Command that the userid is forced to run
    • cl_soundscape_flush -
    • playgamesound - Play a gamesound which will not stop other sounds playing
    • r_screenoverlay - Applies an overlay to the clients screen
    • slot1 through slot10 and slot0
    • cancelselect
    • invnext - Force the client to his next weapon
    • invprev - Force the client to his previous weapon
    • lastinv - Force the client to his last weapon used
    • cl_spec_mode
    • play - Play a sound
    • dsp_player
    • echo - Print text to a clients console
    • name - Change a players name


Examples

def player_activate(event_var):
    name = event_var["es_username"]
    if not name.startswith("My name is"):
        es.cexec(event_var["userid"],"name My name is " + name)
es.cexec(userid,"echo This text will show up on userid's console")

Notes

  • May not force the user to run server-side commands


See Also

blog comments powered by Disqus