Functions (Player Control) - ShadowBonnieRUS/GMOD-SB_Advanced_Nextbots_Base GitHub Wiki
Here are descriptions for functions used in base in cl_playercontrol.lua
, playercontrol.lua
and drive.lua
files.
🔸 NEXTBOT:ModifyPlayerControlHUD
Allows modify HUD with bot's info.
Arguments: 6
- number | X HUD coordinate.
- number | Y HUD coordinate.
- number | Width of health bar.
- number | Height of health bar.
- number | X HUD coordinate of crosshair.
- number | Y HUD coordinate of crosshair.
Returns: 1
- bool | Return true to prevent drawing default HUD.
✏️⚠️🔹🔸 NEXTBOT:GetEntityDriveMode
Sets right drive mode.
🔹🔸 NEXTBOT:ModifyControlPlayerButtons
Allows modify buttons when bot controlled by player.
Arguments: 1
- number | Buttons from MoveData.
Returns: 1
- any | Return modified buttons (number) or nothing/nil/false to not change.
🔹 NEXTBOT:IsControlledByPlayer
Returns true if bot currently controlled by player.
Arguments: 0
Returns: 1
- bool | Is bot controlled by player or not.
🔹 NEXTBOT:StartControlByPlayer
Starts bot control by player.
Arguments: 1
- Player | Who will control bot.
Returns: 0
🔹 NEXTBOT:StopControlByPlayer
Stops bot control by player.
Arguments: 0
Returns: 0
🔹 NEXTBOT:ControlPlayerKeyDown
Returns true if key of player who controls bot is downed.
Arguments: 1
- number | Key. See IN_ Enums.
Returns: 1
- bool | Key is downed.
🔹 NEXTBOT:ControlPlayerKeyPressed
Returns true if player who controls bot has pressed given key at this bot behaviour tick.
Arguments: 1
- number | Key. See IN_ Enums.
Returns: 1
- bool | Key is downed.