Skocz do zawartości

  • Zaloguj korzystając z Facebooka Zaloguj korzystając z Twittera Zaloguj przez Steam Zaloguj poprzez Google      Logowanie »   
  • Rejestracja

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.

  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie

[CS:GO] Bot Toggle (v1.0, 2015-10-16)


  • Nie możesz napisać tematu
  • Zaloguj się, aby dodać odpowiedź
Brak odpowiedzi do tego tematu

#1 Adminek AMXX.PL

    Admin :)

  • Bot

Reputacja: 156
Profesjonalista

  • Postów:7173
  • Lokalizacja:AMXX.PL
Offline

Napisano 16.10.2015 04:55

Bot Toggle v1.0


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.


Dołączona grafika




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 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 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 (-1 or 0 = always allow; default: 2)
sm_bot_toggle_cooldown - Do not allow players to toggle bots for x seconds after a 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; max. 32 characters; leave empty to disable; default: "generic")




Hints

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

After changing the command using the sm_bot_toggle_command cvar, you have to restart the plugin for the change to become active.

Changes to any other cvar, including bot_quota and bot_quota_mode, are picked up right a way.




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.




Notes

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

I did some CS 1.6 plugins back in the day, and this plugin is my return to Pawn after many years. Comments on the code I wrote are most welcome.
It would be great if you'd care to report any bugs or incompatibilities you find as well.

Only owning CS:GO myself, I can't be sure if this plugin would work for other games, but I'm thinking CS:S wouldn't be a problem. It would be great if anyone could confirm.
I'd be happy to extend the plugin for other games if you'd show me the way.





Attached Files Dołączona grafikaGet Plugin or Get Source (bottoggle.sp - 19.9 KB)

Wyświetl pełny artykuł




Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych