Raised This Month: $51 Target: $400
 12% 

[CS:GO] [CS:S] Bot Toggle (v1.0.1, 2015-10-21)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author
decowboy
AlliedModders Donor
Join Date: Oct 2015
Location: Guadalajara, Mexico
Plugin ID:
4851
Plugin Version:
v1.0.1
Plugin Category:
General Purpose
Plugin Game:
Counter-Strike: GO
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Allow players to enable/disable bots with a simple chat command
    Old 10-15-2015 , 23:55   [CS:GO] [CS:S] Bot Toggle (v1.0.1, 2015-10-21)
    Reply With Quote #1

    Bot Toggle v1.0.1


    Description

    ----------------------------------------------------

    Sometimes people like to play with bots and sometimes people like to play without them.
    This plugin offers players an easy way of toggling bots on or off: a simple chat command.

    Bot Toggle is plain simple in its use, works out-of-the-box and can be customized with cvars.
    It was written to be as straight forward as possible.

    Even if you're already using a plugin to manage the bots, this plugin could be a nice addition to your server,
    offering players an alternative way to easily enable or disable bots,
    without anyone having to navigate a menu or the console.






    Features

    ----------------------------------------------------

    - Players can toggle bots on and off with a chat command.

    - Set whether bots should be on or off by default.
    - Customize the command that players use to toggle the bots.

    - Automatically announce to players in chat how they can toggle the bots.
    - Limit the toggling of bots to the first x rounds of the match.
    - Allow admins to toggle when other players can't.

    - Automatically disable when there are so many players that bots aren't needed.
    - Log to the server console when a player toggles the bots.

    - Listens to the standard bot_quota and bot_quota_mode cvars.



    How does it work?
    ----------------------------------------------------

    You can modify the behaviour of Bot Toggle using the cvars below, but this is how the plugin would work by default:

    1. A new map is loaded.
    2. A certain number of bots spawn, corresponding with the bot_quota and bot_quota_mode cvars.
    3. Players join and the plugin announces itself in chat.
    4. Players say /bots or !bots in chat to toggle the bots off (or on).
    5. Bots leave (or join).

    After a player toggles the bots, nobody will be able to toggle them for 6 seconds, with the exception of players with the admin generic flag. This is to prevent flooding.

    After 2 rounds have been played, players can no longer toggle the bots, with the exception of players with the admin generic flag. This is to prevent abuse.

    If the bot_quota_mode cvar is set to fill and the value of the bot_quota cvar is equal to or lower than the amount of human players, there won't be any bots regardless of how they're toggled.
    The plugin would remain silent and inactive until enough players leave, the bot_quota cvar is increased or bots are manually added.



    Cvars
    ----------------------------------------------------

    In addition to the cvars below, you will need to set the bot_quota and bot_quota_mode cvars to your liking.
    If the bot_quota cvar is set to 0, then this plugin will disable itself.

    Quote:
    bot_quota - Set to # of bots allowed on server
    bot_quota_mode - Determines the type of quota. Allowed values: 'normal' and 'fill'. If 'fill', the server will adjust bots to keep N players in the game, where N is bot_quota.
    Quote:
    sm_bot_toggle - Should players be allowed to toggle bots? (0/1; default: 1)
    sm_bot_toggle_default - Should bots automatically spawn when a new map is loaded? (0/1; default: 1)
    sm_bot_toggle_command - Command for players to toggle bots with (do *not* prepend with exclamation mark or slash; max. 32 characters; default: "bots")
    sm_bot_toggle_chat - Should the use of the toggle command in chat without an exclamation mark or slash in front of it be allowed? (0/1; default: 0)
    sm_bot_toggle_announce - Announce the toggle command to players in chat? (0/1; default: 1)
    sm_bot_toggle_rounds - Only allow players to toggle bots during the first x rounds of the match (-1 or 0 = always allow; default: 2)
    sm_bot_toggle_cooldown - Do not allow players to toggle bots for x seconds after the previous toggle (-1 or 0 = always allow; default: 6)
    sm_bot_toggle_flag - Allow admins with this flag to toggle even if other players can't (e.g. "kick" for admin kick flag; max. 32 characters; leave empty to disable; default: "generic")



    Compatibility

    ----------------------------------------------------

    Bot Toggle uses the standard bot-related cvars, which means it is compatible with plugins that use bot_quota, bot_kick, bot_add, etc. to regulate the amount of bots. Most plugins do.

    Plugins that add or remove bots without it being reflected in the value of the bot_quota cvar aren't compatible with this plugin.



    Changelog

    ----------------------------------------------------

    v1.0.1 (2015-10-21, changes)
    - Fix for "Client index is invalid"
    - Updated to new-style declarations
    - Allow changing the toggle command on-the-fly
    - Minor improvements and code cleanup

    v1.0 (2015-10-16) // 62 downloads
    - Initial release



    Notes

    ----------------------------------------------------

    It would be great if you'd care to report any bugs or incompatibilities you find.



    Attached Files
    File Type: sp Get Plugin or Get Source (bottoggle.sp - 2694 views - 20.1 KB)

    Last edited by decowboy; 06-15-2017 at 09:00. Reason: compatible with cs:s
    decowboy is offline
     



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 02:36.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode