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

[TF2] Player modes


  • 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:7172
  • Lokalizacja:AMXX.PL
Offline

Napisano 18.02.2014 23:03

<!-- BEGIN TEMPLATE: postbit_external -->
<div>This is my first attempt at writing a plugin, and I did it because me and some buddies were screwing around as fat scouts when suddenly a wild spy appeared (2 Teams, 23 Heavies, 1 Spy thinking they are an exception). Feed back and suggestions are welcomed. <br /><br /><font size="4">Current &quot;Modes&quot;</font><ol style="list-style-type: decimal"><li>Fat Scouts<ul><li>Class: Heavy</li>
<li>Weapons:<ul><li>Secondary (Shotgun/Food)</li>
</ul></li>
</ul></li>
<li>Pew Pew Spies<ul><li>Class: Spy</li>
<li>Weapons:<ul><li> Primary (Revolver)</li>
</ul></li>
</ul></li>
<li>Heavy Boxing<ul><li>Class: Heavy</li>
<li>Weapons:<ul><li> Secondary (Food Only)</li>
<li> Melee</li>
</ul></li>
</ul></li>
<li>Chargen Demoknights<ul><li>Class: Demoman</li>
<li>Weapons:<ul><li>Secondary (Shield Only)</li>
<li> Melee</li>
</ul></li>
</ul></li>
</ol><br /><font size="4">CVAR/s</font><ul><li>sm_playermode (Default 0) 0 - Disabled, 1 - Fat Scouts, 2 - Pew pew Spies, 3 - Heavy boxing, 4 - Chargen Demoknights</li>
</ul><br /><font size="4">ToDo:</font><ul><li>Figure out how to make demomen have unlimited charge</li>
<li>Add battle medic</li>
<li>Learn to make votes</li>
<li>Fix the thing where weapons from previous class transfer to new one</li>
<li>Make more ToDo lists</li>
<li>End world hunger</li>
</ul><br /><font size="4">For some reason I put the code in the text box</font><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;"><!-- 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"></span><span style="color: #FF8000">#include&nbsp;&lt;sourcemod&gt;
<br />#include&nbsp;&lt;tf2_stocks&gt;
<br />#include&nbsp;&lt;sdkhooks&gt;
<br />
<br /></span><span style="color: #007700">public&nbsp;</span><span style="color: #0000BB">Plugin</span><span style="color: #007700">:</span><span style="color: #0000BB">myinfo&nbsp;</span><span style="color: #007700">=
<br />{
<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">name&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"[TF2]&nbsp;Player&nbsp;modes"</span><span style="color: #007700">,
<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">author&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"vman315"</span><span style="color: #007700">,
<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">description&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"Witty&nbsp;words&nbsp;here."</span><span style="color: #007700">,
<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">version&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"1.1"</span><span style="color: #007700">,
<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">url&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"http://vman315.com"
<br /></span><span style="color: #007700">}
<br />
<br />new&nbsp;</span><span style="color: #0000BB">Handle</span><span style="color: #007700">:</span><span style="color: #0000BB">sm_playermode</span><span style="color: #007700">;
<br />&nbsp;
<br />public&nbsp;</span><span style="color: #0000BB">OnPluginStart</span><span style="color: #007700">()
<br />{
<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">sm_playermode&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">CreateConVar</span><span style="color: #007700">(&nbsp;</span><span style="color: #DD0000">"sm_playermode"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"0"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"1&nbsp;-&nbsp;Fat&nbsp;Scouts,&nbsp;2&nbsp;-&nbsp;Pew&nbsp;pew&nbsp;Spies,&nbsp;3&nbsp;-&nbsp;Heavy&nbsp;boxing,&nbsp;4&nbsp;-&nbsp;Chargen&nbsp;Demoknights"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">FCVAR_NOTIFY</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0.0</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">4.0&nbsp;</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">HookEvent</span><span style="color: #007700">(</span><span style="color: #DD0000">"player_spawn"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">event_PlayerSpawn</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">HookEvent</span><span style="color: #007700">(</span><span style="color: #DD0000">"post_inventory_application"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">Event_PlayerResupply</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">EventHookMode_Post</span><span style="color: #007700">);
<br />}
<br />public&nbsp;</span><span style="color: #0000BB">event_PlayerSpawn</span><span style="color: #007700">(</span><span style="color: #0000BB">Handle</span><span style="color: #007700">:</span><span style="color: #0000BB">event</span><span style="color: #007700">,&nbsp;const&nbsp;</span><span style="color: #0000BB">String</span><span style="color: #007700">:</span><span style="color: #0000BB">name</span><span style="color: #007700">[],&nbsp;</span><span style="color: #0000BB">bool</span><span style="color: #007700">:</span><span style="color: #0000BB">dontBroadcast</span><span style="color: #007700">)
<br />{
<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;</span><span style="color: #0000BB">client&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">GetClientOfUserId</span><span style="color: #007700">(</span><span style="color: #0000BB">GetEventInt</span><span style="color: #007700">(</span><span style="color: #0000BB">event</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"userid"</span><span style="color: #007700">));
<br /></span><span style="color: #FF8000">//&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;iWeaponIndex&nbsp;=&nbsp;GetEntProp(iWeapon,&nbsp;Prop_Send,&nbsp;"m_iItemDefinitionIndex");//
<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">switch(</span><span style="color: #0000BB">GetConVarInt</span><span style="color: #007700">(</span><span style="color: #0000BB">sm_playermode</span><span style="color: #007700">))&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;{
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">:
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//Fat&nbsp;Scout//
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">TF2_GetPlayerClass</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">)&nbsp;!=&nbsp;</span><span style="color: #0000BB">TFClass_Heavy</span><span style="color: #007700">)
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">TF2_SetPlayerClass</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">TFClass_Heavy</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">TF2_RegeneratePlayer</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">TF2_RemoveWeaponSlot</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">TF2_RemoveWeaponSlot</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">2</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">PrintToChat</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Its&nbsp;Fat&nbsp;Scout&nbsp;time!"</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;</span><span style="color: #0000BB">2</span><span style="color: #007700">:
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//PewPewSpy//
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">TF2_GetPlayerClass</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">)&nbsp;!=&nbsp;</span><span style="color: #0000BB">TFClass_Spy</span><span style="color: #007700">)
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">TF2_SetPlayerClass</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">TFClass_Spy</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">TF2_RegeneratePlayer</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">TF2_RemoveWeaponSlot</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">TF2_RemoveWeaponSlot</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">2</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">TF2_RemoveWeaponSlot</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">3</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">TF2_RemoveWeaponSlot</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">4</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">TF2_RemoveWeaponSlot</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">5</span><span style="color: #007700">);
<br />
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">PrintToChat</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Its&nbsp;Pew&nbsp;Pew&nbsp;Spy&nbsp;time!"</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;</span><span style="color: #0000BB">3</span><span style="color: #007700">:
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//Heavy&nbsp;Boxing//
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">{
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">TF2_GetPlayerClass</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">)&nbsp;!=&nbsp;</span><span style="color: #0000BB">TFClass_Heavy</span><span style="color: #007700">)
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">TF2_SetPlayerClass</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">TFClass_Heavy</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">TF2_RegeneratePlayer</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">TF2_RemoveWeaponSlot</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(</span><span style="color: #0000BB">GetEntProp</span><span style="color: #007700">(</span><span style="color: #0000BB">GetPlayerWeaponSlot</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">),&nbsp;</span><span style="color: #0000BB">Prop_Send</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"m_iItemDefinitionIndex"</span><span style="color: #007700">)&nbsp;!=&nbsp;(</span><span style="color: #0000BB">42&nbsp;</span><span style="color: #007700">||&nbsp;</span><span style="color: #0000BB">159&nbsp;</span><span style="color: #007700">||&nbsp;</span><span style="color: #0000BB">311&nbsp;</span><span style="color: #007700">||&nbsp;</span><span style="color: #0000BB">433&nbsp;</span><span style="color: #007700">||&nbsp;</span><span style="color: #0000BB">863&nbsp;</span><span style="color: #007700">||&nbsp;</span><span style="color: #0000BB">1002</span><span style="color: #007700">)&nbsp;)
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//Can&nbsp;you&nbsp;eat&nbsp;it?&nbsp;If&nbsp;not&nbsp;get&nbsp;rid&nbsp;of&nbsp;it//
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">{
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">TF2_RemoveWeaponSlot</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">PrintToChat</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Its&nbsp;Heavy&nbsp;boxing&nbsp;time!"</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;</span><span style="color: #0000BB">4</span><span style="color: #007700">:
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//Charge'n&nbsp;Demoknight//
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">{
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">TF2_GetPlayerClass</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">)&nbsp;!=&nbsp;</span><span style="color: #0000BB">TFClass_DemoMan</span><span style="color: #007700">)
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">TF2_SetPlayerClass</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">TFClass_DemoMan</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">TF2_RegeneratePlayer</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(</span><span style="color: #0000BB">GetEntProp</span><span style="color: #007700">(</span><span style="color: #0000BB">GetPlayerWeaponSlot</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">),&nbsp;</span><span style="color: #0000BB">Prop_Send</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"m_iItemDefinitionIndex"</span><span style="color: #007700">)&nbsp;!=&nbsp;(</span><span style="color: #0000BB">608&nbsp;</span><span style="color: #007700">||&nbsp;</span><span style="color: #0000BB">405</span><span style="color: #007700">)&nbsp;)
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">TF2_RemoveWeaponSlot</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(</span><span style="color: #0000BB">GetEntProp</span><span style="color: #007700">(</span><span style="color: #0000BB">GetPlayerWeaponSlot</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">),&nbsp;</span><span style="color: #0000BB">Prop_Send</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"m_iItemDefinitionIndex"</span><span style="color: #007700">)&nbsp;!=&nbsp;(</span><span style="color: #0000BB">131&nbsp;</span><span style="color: #007700">||&nbsp;</span><span style="color: #0000BB">406</span><span style="color: #007700">)&nbsp;)
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">TF2_RemoveWeaponSlot</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">PrintToChat</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"If&nbsp;you&nbsp;have&nbsp;a&nbsp;Chargin'&nbsp;Targe&nbsp;or&nbsp;a&nbsp;Splendid&nbsp;Screen,&nbsp;you&nbsp;need&nbsp;to&nbsp;equip&nbsp;them&nbsp;to&nbsp;move."</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">PrintToChat</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Charge'n&nbsp;Demoknight&nbsp;time!"</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
<br />&nbsp;&nbsp;&nbsp;&nbsp;}
<br />}
<br />public&nbsp;</span><span style="color: #0000BB">Event_PlayerResupply</span><span style="color: #007700">(</span><span style="color: #0000BB">Handle</span><span style="color: #007700">:</span><span style="color: #0000BB">event</span><span style="color: #007700">,&nbsp;const&nbsp;</span><span style="color: #0000BB">String</span><span style="color: #007700">:</span><span style="color: #0000BB">name</span><span style="color: #007700">[],&nbsp;</span><span style="color: #0000BB">bool</span><span style="color: #007700">:</span><span style="color: #0000BB">dontBroadcast</span><span style="color: #007700">)
<br />{
<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;</span><span style="color: #0000BB">client&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">GetClientOfUserId</span><span style="color: #007700">(</span><span style="color: #0000BB">GetEventInt</span><span style="color: #007700">(</span><span style="color: #0000BB">event</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"userid"</span><span style="color: #007700">));
<br />&nbsp;&nbsp;&nbsp;&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;switch(</span><span style="color: #0000BB">GetConVarInt</span><span style="color: #007700">(</span><span style="color: #0000BB">sm_playermode</span><span style="color: #007700">))&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;{
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">:
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//Fat&nbsp;Scout//
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">TF2_GetPlayerClass</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">)&nbsp;!=&nbsp;</span><span style="color: #0000BB">TFClass_Heavy</span><span style="color: #007700">)
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">TF2_SetPlayerClass</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">TFClass_Heavy</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">TF2_RemoveWeaponSlot</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">TF2_RemoveWeaponSlot</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">2</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">PrintToChat</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Its&nbsp;Fat&nbsp;Scout&nbsp;time!"</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;</span><span style="color: #0000BB">2</span><span style="color: #007700">:
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//PewPewSpy//
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">TF2_GetPlayerClass</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">)&nbsp;!=&nbsp;</span><span style="color: #0000BB">TFClass_Spy</span><span style="color: #007700">)
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">TF2_SetPlayerClass</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">TFClass_Spy</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">TF2_RemoveWeaponSlot</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">TF2_RemoveWeaponSlot</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">2</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">TF2_RemoveWeaponSlot</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">3</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">TF2_RemoveWeaponSlot</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">4</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">TF2_RemoveWeaponSlot</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">5</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">PrintToChat</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Its&nbsp;Pew&nbsp;Pew&nbsp;Spy&nbsp;time!"</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;</span><span style="color: #0000BB">3</span><span style="color: #007700">:
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//Heavy&nbsp;Boxing//
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">{
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">TF2_GetPlayerClass</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">)&nbsp;!=&nbsp;</span><span style="color: #0000BB">TFClass_Heavy</span><span style="color: #007700">)
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">TF2_SetPlayerClass</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">TFClass_Heavy</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">TF2_RemoveWeaponSlot</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(</span><span style="color: #0000BB">GetEntProp</span><span style="color: #007700">(</span><span style="color: #0000BB">GetPlayerWeaponSlot</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">),&nbsp;</span><span style="color: #0000BB">Prop_Send</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"m_iItemDefinitionIndex"</span><span style="color: #007700">)&nbsp;!=&nbsp;(</span><span style="color: #0000BB">42&nbsp;</span><span style="color: #007700">||&nbsp;</span><span style="color: #0000BB">159&nbsp;</span><span style="color: #007700">||&nbsp;</span><span style="color: #0000BB">311&nbsp;</span><span style="color: #007700">||&nbsp;</span><span style="color: #0000BB">433&nbsp;</span><span style="color: #007700">||&nbsp;</span><span style="color: #0000BB">863&nbsp;</span><span style="color: #007700">||&nbsp;</span><span style="color: #0000BB">1002</span><span style="color: #007700">)&nbsp;)
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//Can&nbsp;you&nbsp;eat&nbsp;it?&nbsp;If&nbsp;not&nbsp;get&nbsp;rid&nbsp;of&nbsp;it//
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">{
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">TF2_RemoveWeaponSlot</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">PrintToChat</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Its&nbsp;Heavy&nbsp;boxing&nbsp;time!"</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;</span><span style="color: #0000BB">4</span><span style="color: #007700">:
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//Charge'n&nbsp;Demoknight//
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">{
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">TF2_GetPlayerClass</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">)&nbsp;!=&nbsp;</span><span style="color: #0000BB">TFClass_DemoMan</span><span style="color: #007700">)
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">TF2_SetPlayerClass</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">TFClass_DemoMan</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(</span><span style="color: #0000BB">GetEntProp</span><span style="color: #007700">(</span><span style="color: #0000BB">GetPlayerWeaponSlot</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">),&nbsp;</span><span style="color: #0000BB">Prop_Send</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"m_iItemDefinitionIndex"</span><span style="color: #007700">)&nbsp;!=&nbsp;(</span><span style="color: #0000BB">608&nbsp;</span><span style="color: #007700">||&nbsp;</span><span style="color: #0000BB">405</span><span style="color: #007700">)&nbsp;)
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">TF2_RemoveWeaponSlot</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(</span><span style="color: #0000BB">GetEntProp</span><span style="color: #007700">(</span><span style="color: #0000BB">GetPlayerWeaponSlot</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">),&nbsp;</span><span style="color: #0000BB">Prop_Send</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"m_iItemDefinitionIndex"</span><span style="color: #007700">)&nbsp;!=&nbsp;(</span><span style="color: #0000BB">131&nbsp;</span><span style="color: #007700">||&nbsp;</span><span style="color: #0000BB">406</span><span style="color: #007700">)&nbsp;)
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">TF2_RemoveWeaponSlot</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">PrintToChat</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"If&nbsp;you&nbsp;have&nbsp;a&nbsp;Chargin'&nbsp;Targe&nbsp;or&nbsp;a&nbsp;Splendid&nbsp;Screen,&nbsp;you&nbsp;need&nbsp;to&nbsp;equip&nbsp;them&nbsp;to&nbsp;move."</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">PrintToChat</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Charge'n&nbsp;Demoknight&nbsp;time!"</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
<br />&nbsp;&nbsp;&nbsp;&nbsp;}
<br />}
<br />
<br />public&nbsp;</span><span style="color: #0000BB">TF2_OnConditionRemoved</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">TFCond</span><span style="color: #007700">:</span><span style="color: #0000BB">condition</span><span style="color: #007700">)
<br />{
<br />&nbsp;&nbsp;&nbsp;&nbsp;if(</span><span style="color: #0000BB">GetConVarBool</span><span style="color: #007700">(</span><span style="color: #0000BB">sm_playermode</span><span style="color: #007700">)&nbsp;==&nbsp;</span><span style="color: #0000BB">4&nbsp;</span><span style="color: #007700">&amp;&amp;&nbsp;</span><span style="color: #0000BB">condition&nbsp;</span><span style="color: #007700">==&nbsp;</span><span style="color: #0000BB">TFCond_Charging</span><span style="color: #007700">)
<br />&nbsp;&nbsp;&nbsp;&nbsp;{
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">SetChargeMeter</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;}
<br />}
<br />
<br /></span><span style="color: #0000BB">stock&nbsp;SetChargeMeter</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">Float</span><span style="color: #007700">:</span><span style="color: #0000BB">flChargeMeter&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">100.0</span><span style="color: #007700">)
<br />{
<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">SetEntPropFloat</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">Prop_Send</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"m_flChargeMeter"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">flChargeMeter</span><span style="color: #007700">);
<br />}&nbsp;
<br /></span><span style="color: #0000BB"></span>
</span>
</code><!-- php buffer end -->
</div>
</code>
<hr />
</div>
</div>
<!-- END TEMPLATE: bbcode_php_printable --></div>
</div>
</div><br /><br /><font size="1">Really needs a better name. Maybe George.</font></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=130724"><strong>Get Plugin</strong></a> or
<a href="https://forums.allie...38;d=1392760978">Get Source</a> (playermodes.sp - 5.1 KB)


</td>
</tr>
<!-- END TEMPLATE: postbit_attachment -->
</table>
</fieldset>


</div>

<!-- END TEMPLATE: postbit_external -->

Wyświetl pełny artykuł




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

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