<div><font size="4">Plugin Information:<br /><br /><font size="2">This plugin aims to replace plugins like Super Versus, Bebop, and my old Player-Plus as a Bot Management plugin. <i><b>Bot Controller is a framework</b></i> which allows other plugins to be built off of it.<br /><br /><br /><font size="4">What is the framework?<br /><br /><font size="2"><b>BotController </b>is the framework; it's a plugin built on natives & forwards, but doesn't really do anything unless those calls are utilized. The framework can be expanded upon without harming any plugins developed for it. Plugins written for the framework simply expand on its base capabilities. BotController <b>must</b> be installed on your server for its modules to work on the server.<br /><br /><br /><font size="4">What are the modules?<br /><br /><font size="2">Currently only one module exists, but you're welcome to develop your own! The module in question is <b>bc_config</b> which, using the calls, is what actually manages the bots.<br /><b>bc_config </b>adds several new cvars:<br /><div style="margin: 5px;">
<div class="smallfont" style="margin-bottom: 2px;">
<b>Spoiler</b> <input value="Show" style="margin: 0px; padding: 0px; width: 45px; font-size: 10px;" onclick="if(this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != 'inline')
{ this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'inline'; this.innerText = ''; this.value = 'Hide'; }
else
{ this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value='Show'; }" type="button">
</div>
<div class="alt2" style="border: 1px inset; padding: 6px;">
<div class="spoiler" style="display: none;"><div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px">PHP Code:</div>
<div class="alt2">
<hr />
<code style="white-space:nowrap">
<div dir="ltr" style="text-align:left;">
<!-- php buffer start --><code><span style="color: #000000">
<span style="color: #0000BB">sm_survivor_limit </span><span style="color: #007700">- default, </span><span style="color: #0000BB">4</span><span style="color: #007700">, </span><span style="color: #0000BB">maximum players allowed on the survivor team<br />sm_infected_limit </span><span style="color: #007700">- default, </span><span style="color: #0000BB">4</span><span style="color: #007700">, </span><span style="color: #0000BB">maximum players allowed on the infected team<br />sm_survivor_minimum </span><span style="color: #007700">- default, </span><span style="color: #0000BB">4</span><span style="color: #007700">, </span><span style="color: #0000BB">this </span><span style="color: #FF8000"># of survivors must always exist; bots make up the difference.<br /></span><span style="color: #0000BB">sm_reserveslots </span><span style="color: #007700">- default, </span><span style="color: #0000BB">2</span><span style="color: #007700">, </span><span style="color: #0000BB">the number of reserve slots </span><span style="color: #007700">(</span><span style="color: #0000BB">slots </span><span style="color: #007700">+ </span><span style="color: #0000BB">reserve slots </span><span style="color: #007700">= </span><span style="color: #0000BB">total slots</span><span style="color: #007700">)<br /></span><span style="color: #0000BB">sm_playerslots </span><span style="color: #007700">- default, </span><span style="color: #0000BB">8</span><span style="color: #007700">, </span><span style="color: #0000BB">the maximum players that can be in</span><span style="color: #007700">-</span><span style="color: #0000BB">game</span><span style="color: #007700">, </span><span style="color: #0000BB">regardless of team limits</span><span style="color: #007700">.<br /></span><span style="color: #0000BB">sm_reserveslots_delay </span><span style="color: #007700">- default, </span><span style="color: #0000BB">30</span><span style="color: #007700">, </span><span style="color: #0000BB">the delay </span><span style="color: #007700">(</span><span style="color: #0000BB">in seconds</span><span style="color: #007700">) </span><span style="color: #0000BB">before removing a player </span><span style="color: #007700">for </span><span style="color: #0000BB">reserve slot</span><span style="color: #007700">. </span><span style="color: #0000BB">0 </span><span style="color: #007700">- </span><span style="color: #0000BB">instant kick<br />sm_tank_health_modifier </span><span style="color: #007700">- default, </span><span style="color: #0000BB">1500</span><span style="color: #007700">, </span><span style="color: #0000BB">0 disables</span><span style="color: #007700">; </span><span style="color: #0000BB">health amount given to tank per survivor player</span><span style="color: #007700">.<br /></span><span style="color: #0000BB">sm_tank_health </span><span style="color: #007700">- default, </span><span style="color: #0000BB">6000</span><span style="color: #007700">, </span><span style="color: #0000BB">starting health </span><span style="color: #007700">for </span><span style="color: #0000BB">a tank</span><span style="color: #007700">.<br /></span><span style="color: #0000BB">sm_preserve_teams </span><span style="color: #007700">- default, </span><span style="color: #0000BB">1</span><span style="color: #007700">, </span><span style="color: #0000BB">Prevents Valve</span><span style="color: #DD0000">'s "Team Balance" scramble on new maps.<br />sm_extrameds - default, 1, Before the round starts, all players without medkits will receive one.<br />sm_assign_teams - default, 1, should be disabled if another plugin ever handles team assignments.
<br /></span>
</span>
</code><!-- php buffer end -->
</div>
</code>
<hr />
</div>
</div></div>
</div>
</div><br /><br /><b>bc_config</b> does not create a /cfg/sourcemod/ file for convenience, allowing server operators to add these cvars to their server.cfg or elsewhere, or to simply use the default values associated with the plugin.<br /><br /><br /><font size="4">Installation:<br /><br /><font size="2">Installing the plugin has never been simpler.<br /><br />1. Place botcontrol.txt in your /sourcemod/gamedata/ folder.<br />2. Place botcontroller.phrases in your /sourcemod/translations/ folder.<br />3. Place botcontroller.smx in your /sourcemod/plugins/ folder.<br />4. Place bc_config.smx in your /sourcemod/plugins/ folder.<br /><br /><br /><font size="4">Module Development:<br /><br /><font size="2">Several calls have been written for module development; bc_config, for example, is a module.<br />These can be found in botcontrol.inc<br /><div style="margin: 5px;">
<div class="smallfont" style="margin-bottom: 2px;">
<b>Spoiler</b> <input value="Show" style="margin: 0px; padding: 0px; width: 45px; font-size: 10px;" onclick="if(this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != 'inline')
{ this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'inline'; this.innerText = ''; this.value = 'Hide'; }
else
{ this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value='Show'; }" type="button">
</div>
<div class="alt2" style="border: 1px inset; padding: 6px;">
<div class="spoiler" style="display: none;"><div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px">PHP Code:</div>
<div class="alt2">
<hr />
<code style="white-space:nowrap">
<div dir="ltr" style="text-align:left;">
<!-- php buffer start --><code><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #FF8000">/*<br /> * Calling this native will force the plugin to regulate the survivor bots based<br /> * on whatever the current survivor minimum and maximum requirements are.<br /> * <br /> */<br /></span><span style="color: #0000BB">native OnRegulateSurvivorBots</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">/*<br /> * Forces the player to attempt to join the survivor team - or create bots. See params.<br /> *<br /> * @param client If set to 0, will create a bot but not assign a player to it.<br /> * Will do nothing if the survivor limit has been reached.<br /> *<br /> */<br /></span><span style="color: #0000BB">native OnJoinSurvivorTeam</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">/*<br /> * Sets the Survivor Minimum and Maximum requirements. OnRegulateSurvivorBots() will not<br /> * be called if BotRegulation override is enabled.<br /> *<br /> * @param min The minimum number of survivors that MUST exist. Humans + Bots.<br /> * @param max The maximum number of survivors that CAN exist.<br /> *<br /> */<br /></span><span style="color: #0000BB">native OnSetSurvivorRequirements</span><span style="color: #007700">(</span><span style="color: #0000BB">min</span><span style="color: #007700">, </span><span style="color: #0000BB">max</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">/*<br /> * Will block BotControl core from running any Survivor Bot Restriction Regulation functions.<br /> * If the function is blocked, the OnRegulateSurvivorBots() native must be called for these<br /> * functions to be performed.<br /> *<br /> */<br /></span><span style="color: #0000BB">native OnBlockSurvivorBotRegulation</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">/*<br /> *<br /> * Will allow BotControl core to run all Survivor Bot Restriction Regulation functions.<br /> * This is the default setting. Don't forget to call this OnPluginEnd() if your plugin<br /> * blocks the functionality!!!<br /> *<br /> */<br /></span><span style="color: #0000BB">native OnAllowSurvivorBotRegulation</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">/*<br /> *<br /> * Will allow survivor bots to be in-game even if there are no human survivors in-game.<br /> *<br /> */<br /></span><span style="color: #0000BB">native OnAllowSoloSurvivorBots</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">/*<br /> *<br /> * Will not allow survivor bots to be in-game if there are no human survivors in-game.<br /> *<br /> */<br /></span><span style="color: #0000BB">native OnBlockSoloSurvivorBots</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">/*<br /> *<br /> * Allows the creation of a custom number of survivor bots.<br /> * Important: Disable SurvivorBotRegulation by the core plugin before using this native.<br /> *<br /> * @param count The number of Survivor Bots to create.<br /> *<br /> */<br /></span><span style="color: #0000BB">native OnCreateSurvivorBots</span><span style="color: #007700">(</span><span style="color: #0000BB">count</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">/*<br /> *<br /> * Allows the destruction of a custom number of survivor bots.<br /> * Important: This will not remove bots that are tied to idle players.<br /> *<br /> * @param count The number of Survivor Bots to destroy.<br /> *<br /> */<br /></span><span style="color: #0000BB">native OnDestroySurvivorBots</span><span style="color: #007700">(</span><span style="color: #0000BB">count</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">/*<br /> *<br /> * Allows the setting and management of both infected and survivor team limits.<br /> *<br /> * @param survivorLimit Must be a value greater than 0 or will be ignored.<br /> * @param infectedLimit Must be a value greater or equal to 0 or will be ignored.<br /> *<br /> */<br /></span><span style="color: #0000BB">native OnSlotManagement</span><span style="color: #007700">(</span><span style="color: #0000BB">survivorLimit</span><span style="color: #007700">, </span><span style="color: #0000BB">infectedLimit</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">/*<br /> *<br /> * Adjusts the values, permanently, of reserve slots.<br /> *<br /> * @param reserveslots The number of non-playable (unless under special circumstances) slots on the server.<br /> * @param maximumslots The number of maximum always-playable slots on the server. Make sure maxplayers is reserveslots + maximumslots.<br /> * @param kickdelay The time in seconds (int) until the player is removed (if there are reserve slots available for the connecting player)<br /> * otherwise the player receives no notice and is removed immediately for the connecting player.<br /> *<br /> */<br /></span><span style="color: #0000BB">native OnReserveSlotManagement</span><span style="color: #007700">(</span><span style="color: #0000BB">reserveslots</span><span style="color: #007700">, </span><span style="color: #0000BB">maximumslots</span><span style="color: #007700">, </span><span style="color: #0000BB">kickdelay</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">/*<br /> *<br /> * Enables reserve slots management on the server. Note, this DOES NOT set the reserve slots, the maximum slots, and the kick delay.<br /> * You MUST call OnReserveSlotManagement native (above) and set the values before enabling this (or all hell will break loose)<br /> *<br /> */<br /></span><span style="color: #0000BB">native OnAllowReserveSlots</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">/*<br /> *<br /> * The opposite of enabling.<br /> *<br /> */<br /></span><span style="color: #0000BB">native OnBlockReserveSlots</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">/*<br /> *<br /> * Provides plugins more detailed / selective options for WHICH survivor bots to remove.<br /> * Hope to find a way to add more than a static number of options.<br /> *<br /> * @param count The plugin will kick UP TO this amount of bots (if applicable)<br /> * @param reqs 1 - Only one condition must pass on a bot to remove it. 2 - All received conditions must pass to remove the bot.<br /> * @param param1 Currently, the native supports UP TO 3 UNIQUE params. Your options are, for example:<br /> *<br /> * ".mdl" in a param will check the param string against the bot survivor model.<br /> * "!dead" as a param will require bots to be not dead.<br /> * "dead" as a param will require bots to be dead.<br /> * *NOTE* -> You could use 3 different models as your params, if for example, you wanted to remove bots of all those<br /> * models. However, for that to work, reqs would have to be set to 1.<br /> *<br /> * I'd really love to add more, or, if possible, IF GetNativeArray will allow me to pass an ADT Array...<br /> * !-- IMPORTANT --!<br /> * Because this native is expected to be used under special circumstances, it DOES NOT adjust the survivor bot minimum<br /> * requirement after kicking bots in this way, in the assumption that an author will do something with the forward that<br /> * immediately follows, OnDestroySurvivorBotsFwd.<br /> *<br /> */<br /></span><span style="color: #0000BB">native OnDestroySurvivorBotsEx</span><span style="color: #007700">(</span><span style="color: #0000BB">count</span><span style="color: #007700">, </span><span style="color: #0000BB">reqs</span><span style="color: #007700">, </span><span style="color: #0000BB">String</span><span style="color: #007700">:</span><span style="color: #0000BB">param1</span><span style="color: #007700">[], </span><span style="color: #0000BB">String</span><span style="color: #007700">:</span><span style="color: #0000BB">param2</span><span style="color: #007700">[], </span><span style="color: #0000BB">String</span><span style="color: #007700">:</span><span style="color: #0000BB">param3</span><span style="color: #007700">[]);<br /><br /></span><span style="color: #FF8000">/*<br /> *<br /> * The only purpose of this native is to request whether Bot Regulation is enabled or disabled on the core plugin.<br /> * Will shoot off the OnRequestSurvivorBotRegulationFwd forward.<br /> *<br /> */<br /></span><span style="color: #0000BB">native OnRequestSurvivorBotRegulation</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">/*<br /> *<br /> * When a new bot is created, sends out information about the bot and new client.<br /> * Requested by DeathChaos25<br /> *<br /> * @Param client The Client ID of the player who will be taking ownership of the bot.<br /> * @Param cnetp The net prop ID of the bot.<br /> * @Param cmodel The character model of the bot.<br /> *<br /> */<br /></span><span style="color: #0000BB">forward OnBotCreatedFwd</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">, </span><span style="color: #0000BB">cnetp</span><span style="color: #007700">, </span><span style="color: #0000BB">String</span><span style="color: #007700">:</span><span style="color: #0000BB">cmodel</span><span style="color: #007700">[]);<br /><br /></span><span style="color: #FF8000">/*<br /> *<br /> * After all eligible bots have been removed, this forward fires, notifying plugins of the number<br /> * of bots that were removed - it's possible the number may differ from the value the plugin that<br /> * triggered this forward requested be removed.<br /> *<br /> * @Param count The number of survivor bots that were kicked through OnDestroySurvivorBotsEx native.<br /> *<br /> */<br /></span><span style="color: #0000BB">forward OnDestroySurvivorBotsFwd</span><span style="color: #007700">(</span><span style="color: #0000BB">count</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">/*<br /> *<br /> * This forward is called when OnRequestSurvivorBotRegulation native is called. It will notify any listening<br /> * plugins on whether or not Bot Regulation is automated through the plugin or not.<br /> *<br /> * @Bool IsEnabled 0 for disabled, 1 for enabled.<br /> *<br /> */<br /></span><span style="color: #0000BB">forward OnRequestSurvivorBotRegulationFwd</span><span style="color: #007700">(</span><span style="color: #0000BB">bool</span><span style="color: #007700">:</span><span style="color: #0000BB">IsEnabled</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">/*<br /> *<br /> * This forward is called when the first client loads into the game.<br /> *<br /> */<br /></span><span style="color: #0000BB">forward OnFirstClientLoadedFwd</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">/*<br /> *<br /> * This forward fires when a player goes idle and is moved to the spectator team.<br /> *<br /> * @Param client The client ID.<br /> * @Param PrmWpn The String of the Primary weapon. Is -1 if no weapon found.<br /> * @Param PrmUp The upgrades for the Primary weapon. Is -1 if no weapon.<br /> * @Param SecWpn The String of the Secondary weapon. Is -1 if no weapon found.<br /> * @Param SecUp The upgrades for the Secondary weapon. Is -1 if no weapon.<br /> * @Param GrnWpn The grenade the player is holding, -1 if not found.<br /> * @Param AidWpn The First Aid item the player is holding, -1 if not found.<br /> * @Param PillsWpn The Pills item the player is holding, -1 if not found.<br /> *<br /> */<br /></span><span style="color: #0000BB">forward OnSurvivorIdleFwd</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">, </span><span style="color: #0000BB">String</span><span style="color: #007700">:</span><span style="color: #0000BB">PrmWpn</span><span style="color: #007700">[], </span><span style="color: #0000BB">PrmUp</span><span style="color: #007700">, </span><span style="color: #0000BB">String</span><span style="color: #007700">:</span><span style="color: #0000BB">SecWpn</span><span style="color: #007700">[], </span><span style="color: #0000BB">SecUp</span><span style="color: #007700">, </span><span style="color: #0000BB">String</span><span style="color: #007700">:</span><span style="color: #0000BB">GrnWpn</span><span style="color: #007700">[], </span><span style="color: #0000BB">String</span><span style="color: #007700">:</span><span style="color: #0000BB">AidWpn</span><span style="color: #007700">[], </span><span style="color: #0000BB">String</span><span style="color: #007700">:</span><span style="color: #0000BB">PillsWpn</span><span style="color: #007700">[]);<br /><br /></span><span style="color: #FF8000">/*<br /> *<br /> * This forward fires when a player who was an idle Survivor has rejoined the game.<br /> *<br /> * @Param client The client ID.<br /> *<br /> */<br /></span><span style="color: #0000BB">forward OnSurvivorIdleEndFwd</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">/*<br /> *<br /> * After a player has successfully cleared the reserve slots check, broadcast it.<br /> * Bot Controller doesn't handle players joining on its own - so another plugin has to do it.<br /> *<br /> * @Param client The client ID.<br /> *<br /> */<br /></span><span style="color: #0000BB">forward OnAnyClientLoaded</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">);
<br /></span><span style="color: #0000BB"></span>
</span>
</code><!-- php buffer end -->
</div>
</code>
<hr />
</div>
</div></div>
</div>
</div><font size="4"><br /></font></font></font></font></font></font></font></font></font></font></font></div>
<br /> <div style="padding:6px">
<fieldset class="fieldset">
<legend>Attached Files</legend>
<table cellpadding="0" cellspacing="3" border="0">
<tr>
<td><img class="inlineimg" src="https://forums.allie...attach/txt.gif"alt="File Type: txt" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td>
<a href="https://forums.allie...control.txt</a>(526 Bytes)
</td>
</tr><tr>
<td><img class="inlineimg" src="https://forums.allie...attach/txt.gif"alt="File Type: txt" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td>
<a href="https://forums.allie...phrases.txt</a>(210 Bytes)
</td>
</tr><tr>
<td><img class="inlineimg" src="https://forums.allie...attach/inc.gif"alt="File Type: inc" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td>
<a href="https://forums.allie...control.inc</a>(9.3 KB)
</td>
</tr><tr>
<td><img class="inlineimg" src="https://forums.allie.../attach/sp.gif"alt="File Type: sp" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td>
<a href="http://www.sourcemod...31"><strong>GetPlugin</strong></a> or
<a href="https://forums.allie...1477943226">GetSource</a> (botcontroller.sp - 29.3 KB)
</td>
</tr><tr>
<td><img class="inlineimg" src="https://forums.allie.../attach/sp.gif"alt="File Type: sp" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td>
<a href="http://www.sourcemod...32"><strong>GetPlugin</strong></a> or
<a href="https://forums.allie...1477943226">GetSource</a> (bc_config.sp - 11.7 KB)
</td>
</tr><tr>
<td><img class="inlineimg" src="https://forums.allie...attach/smx.gif"alt="File Type: smx" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td>
<a href="https://forums.allie...troller.smx</a>(14.6 KB)
</td>
</tr><tr>
<td><img class="inlineimg" src="https://forums.allie...attach/smx.gif"alt="File Type: smx" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td>
<a href="https://forums.allie..._config.smx</a>(7.8 KB)
</td>
</tr>
</table>
</fieldset>
</div>
Wyświetl pełny artykuł
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.
|
Guest Message by DevFuse

[L4D2] Bot Controller v1.5
Temat rozp. Adminek AMXX.PL, 31.10.2016 20:47
Brak odpowiedzi do tego tematu
Użytkownicy przeglądający ten temat: 0
0 użytkowników, 0 gości, 0 anonimowych