<!-- BEGIN TEMPLATE: postbit_external -->
<div>Hello guys!<br /><br />I modified <b><a href="http://forums.allied...ber.php?u=34668" target="_blank">DJ Tsunami</a></b>'s plugin<b> <a href="http://forums.alliedmods.net/showthread.php?t=73104" target="_blank">Tf2 class restrictions</a></b>, so it will limit classes for bots instead.<br />I could not find any plugin for this purpose and default tf2 commands/cvars will not really help you with this. They can force bots to use only one class or not to change class at all, but bots can be kicked when player joins and when he leaves, he will be replaced by a random class bot... or the forced one.You can limit them to use only some classes... I think you get it ;)<br />So I took and modified the code, so it only affects bots. I also removed unnecessary parts of the code and modified cvars so you can use both at the same time.<br /><i><b><br />Cvars:</b></i><br /><!-- BEGIN TEMPLATE: bbcode_php_printable -->
<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_classrestrictbot_enabled 1 </span><span style="color: #FF8000">//(0/1, default 1) Enable/disable restricting classes for bots in TF2.<br /><br /></span><span style="color: #0000BB">sm_classrestrictbot_blu_demomen </span><span style="color: #007700">-</span><span style="color: #0000BB">1<br />sm_classrestrictbot_blu_engineers </span><span style="color: #007700">-</span><span style="color: #0000BB">1<br />sm_classrestrictbot_blu_heavies </span><span style="color: #007700">-</span><span style="color: #0000BB">1<br />sm_classrestrictbot_blu_medics </span><span style="color: #007700">-</span><span style="color: #0000BB">1<br />sm_classrestrictbot_blu_pyros </span><span style="color: #007700">-</span><span style="color: #0000BB">1<br />sm_classrestrictbot_blu_scouts </span><span style="color: #007700">-</span><span style="color: #0000BB">1<br />sm_classrestrictbot_blu_snipers </span><span style="color: #007700">-</span><span style="color: #0000BB">1<br />sm_classrestrictbot_blu_soldiers </span><span style="color: #007700">-</span><span style="color: #0000BB">1<br />sm_classrestrictbot_blu_spies </span><span style="color: #007700">-</span><span style="color: #0000BB">1<br /></span><span style="color: #FF8000">// Limits for Blu classes in TF2. (-1 for no limit, 0 is disabled, 1 or anything higher will be the limit for that class. Default -1)<br /><br /></span><span style="color: #0000BB">sm_classrestrictbot_red_demomen </span><span style="color: #007700">-</span><span style="color: #0000BB">1<br />sm_classrestrictbot_red_engineers </span><span style="color: #007700">-</span><span style="color: #0000BB">1<br />sm_classrestrictbot_red_heavies </span><span style="color: #007700">-</span><span style="color: #0000BB">1<br />sm_classrestrictbot_red_medics </span><span style="color: #007700">-</span><span style="color: #0000BB">1<br />sm_classrestrictbot_red_pyros </span><span style="color: #007700">-</span><span style="color: #0000BB">1<br />sm_classrestrictbot_red_scouts </span><span style="color: #007700">-</span><span style="color: #0000BB">1<br />sm_classrestrictbot_red_snipers </span><span style="color: #007700">-</span><span style="color: #0000BB">1<br />sm_classrestrictbot_red_soldiers </span><span style="color: #007700">-</span><span style="color: #0000BB">1<br />sm_classrestrictbot_red_spies </span><span style="color: #007700">-</span><span style="color: #0000BB">1<br /></span><span style="color: #FF8000">// Limits for Red classes in TF2. (-1 for no limit, 0 is disabled, 1 or anything higher will be the limit for that class. Default -1)
<br /></span><span style="color: #0000BB"></span>
</span>
</code><!-- php buffer end -->
</div>
</code>
<hr />
</div>
</div>
<!-- END TEMPLATE: bbcode_php_printable --><font size="3"><br /><br /></font><i><b>Important info:</b></i><font size="3"><br /></font>Remove cvar tf_bot_force_class, before you start using this plugin.<br />Plugin limits classes when bots spawn, so if you change limits after they have been spawned then you have to wait untill they die or you can slay them.<br /><br /><i><b>Installation:</b></i><br />Copy .smx file to your plugins dir and then put cvars from above into server.cfg or sourcemod.cfg. If you do not include a cvar with it's value then the default value of it will be used, which is -1 = unlimited.<br /><br /><i><b>Credits:</b></i><br />Credit goes to <a href="http://forums.allied...ber.php?u=34668" target="_blank">DJ Tsunami </a>for his plugin. 80% of this plugin is his code. I'm not much of a coder and this is "my" first plugin.</div>
<br /> <div style="padding:6px">
<fieldset class="fieldset">
<legend>Attached Files</legend>
<table cellpadding="0" cellspacing="3" border="0">
<!-- BEGIN TEMPLATE: postbit_attachment -->
<tr>
<td><img class="inlineimg" src="https://forums.allie...s/attach/sp.gif" alt="File Type: sp" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td>
<a href="http://www.sourcemod...?file_id=127582"><strong>Get Plugin</strong></a> or
<a href="https://forums.allie...38;d=1383762650">Get Source</a> (classrestrictbots.sp - 6.3 KB)
</td>
</tr>
<!-- END TEMPLATE: postbit_attachment -->
</table>
</fieldset>
</div>
<!-- END TEMPLATE: postbit_external -->
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
[TF2] Class Restrictions for bots
Temat rozp. Adminek AMXX.PL, 06.11.2013 16:59
Brak odpowiedzi do tego tematu
Użytkownicy przeglądający ten temat: 0
0 użytkowników, 0 gości, 0 anonimowych