Es cexec

From EventScripts Community Encyclopedia


Overview

Syntax: es_cexec <userid> <command>

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_xcexec

Description

Forces the provided userid to run a client-side command

Parameters

  • userid - Userid of the client who is running the command
  • command - Command that the userid is forced to run


Examples

event player_spawn
{
  // Forces player to purchase a deagle
  es_cexec event_var(userid) buy weapon_deagle
}


Notes

  • May not force the user to run server-side commands
  • All the commands can not be forced. To get the list of commands which can be forced, enter the following command in your console :
findflags server_can_execute
// List all the commands which have the "server_can_execute" flag 
  • A list of commands known to work well with es_cexec:
    • buy
    • chooseteam
    • drop
    • echo
    • ignorerad
    • invnext
    • invprev
    • jointeam
    • lastinv
    • play
    • retry
    • slot0, slot1, slot2, slot3, slot4, slot5, slot6, slot7, slot8, slot9
    • etc.


See also


blog comments powered by Disqus