Es isbot

From EventScripts Community Encyclopedia


Overview

Syntax: es_isbot <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_xisbot

Description

Sets the provided variable to 1 if the userid belongs to a bot, 0 if it belongs to a legit player, or -1 if it's an invalid userid.

Parameters

  • variable - This will be a 1 if the userid belongs to a bot, 0 if it belongs to a legit player, or -1 if it's an invalid userid.
  • userid - The valid userid of the player you wish to test.


Examples

es_isbot botcheck event_var(userid)


Notes

  • It's a good idea to use this before using es_cexec as es_cexec does not work on bots.
  • es_isbot returns 1 if the user is a real bot, it returns 0 for real players and fake clients that do not have bot AI (i.e. es_createbot players).
    • The es_createbot fake clients still have the "BOT" Steam-ID
    • So you can check if the user is not a real player that way, and by combining the two checks you can tell if the "bot" is a real bot or ES fake client.


See also


blog comments powered by Disqus