Player.IsBot

From GMod Wiki

Jump to: navigation, search
Function
Syntax Player:IsBot( )
Description:
Returns true if the player is a bot
Returns: Boolean
In Object: Player
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Player.IsBot]Player.IsBot [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionSimple function to check whether the player is a bot
Used onNewerShared.png
Code
 
function checkBot( ply )
 
     if ( ply:IsBot() ) then
          ply:ChatPrint( "You are a bot! You normally shouldn't be seeing this, as humans aren't bots..." )
     else
          ply:ChatPrint( "You aren't a bot, which is a good sign!" )
     end
 
end
concommand.Add( "info_bot", checkBot )
 
OutputYou aren't a bot, which is a good sign!


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox