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

[ANY] Bring/GoTo [UPDATED 7/23/15]


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

Napisano 24.07.2015 07:15

<div><div align="center"><b><font size="5">[ANY] Bring/Goto Plugin!</font></b></div><br /><b><font size="3">INTRODUCTION:</font></b><br />Hey! I am releasing a rework of the Bring/Goto plugin that HyperKiLLeR made<a href="https://forums.allie...php?p=1042766)"target="_blank"> *HERE*</a>. After being asked to edit HyperKiLLeR's plugin, I went into the source and I really did not like it. Here I cleaned up the code, and added functionality to teleport teams aswell. (@T, @CT, etc)<br /><br /><b><font size="3">ABOUT<b></b>:</font></b><br />A plugin that allows you to bring players to where you point your mouse and you can also teleport yourself to a player<br /><br /><b><font size="3">COMMANDS:</font></b> <br />sm_bring &lt;target/@TEAM&gt; - Teleports the target to your mouse cursor<br />sm_goto &lt;target&gt; - Teleports you to the target<br /><br /><b><font size="3">PLUGIN SOURCE:</font></b> <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">#include&nbsp;&lt;sourcemod&gt;<br />#include&nbsp;&lt;sdktools&gt;&nbsp;<br />#include&nbsp;&lt;cstrike&gt;<br />#include&nbsp;&lt;autoexecconfig&gt;<br /><br /></span><span style="color: #007700">new&nbsp;</span><span style="color: #0000BB">Handle</span><span style="color: #007700">:</span><span style="color: #0000BB">g_hPluginEnabled&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">INVALID_HANDLE</span><span style="color: #007700">;<br />new&nbsp;</span><span style="color: #0000BB">bool</span><span style="color: #007700">:</span><span style="color: #0000BB">g_bPluginEnabled</span><span style="color: #007700">;<br /><br />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">"Teleport&nbsp;Player"</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">"Headline,&nbsp;Snippents&nbsp;From&nbsp;:&nbsp;HyperKiLLeR"</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">"Teleport&nbsp;player(s)"</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.0"</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">"Allied-Gamers.com"<br /></span><span style="color: #007700">};<br /><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">AutoExecConfig_SetFile</span><span style="color: #007700">(</span><span style="color: #DD0000">"hl_goto"</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">AutoExecConfig_SetCreateFile</span><span style="color: #007700">(</span><span style="color: #0000BB">true</span><span style="color: #007700">);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">AutoExecConfig_CreateConVar</span><span style="color: #007700">(</span><span style="color: #DD0000">"hl_goto"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"1.0"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Headline's&nbsp;Player&nbsp;Teleport&nbsp;Plugin"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">FCVAR_PLUGIN</span><span style="color: #007700">|</span><span style="color: #0000BB">FCVAR_DONTRECORD</span><span style="color: #007700">|</span><span style="color: #0000BB">FCVAR_NOTIFY</span><span style="color: #007700">);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">g_hPluginEnabled&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">AutoExecConfig_CreateConVar</span><span style="color: #007700">(</span><span style="color: #DD0000">"hl_goto_enabled"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"1"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Enables&nbsp;and&nbsp;disables&nbsp;the&nbsp;goto&nbsp;plugin"</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">1.0</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">HookConVarChange</span><span style="color: #007700">(</span><span style="color: #0000BB">g_hPluginEnabled</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">OnCVarChange</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">g_bPluginEnabled&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">GetConVarBool</span><span style="color: #007700">(</span><span style="color: #0000BB">g_hPluginEnabled</span><span style="color: #007700">);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">RegAdminCmd</span><span style="color: #007700">(</span><span style="color: #DD0000">"sm_goto"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">Command_Goto</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">ADMFLAG_SLAY</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Go&nbsp;to&nbsp;a&nbsp;player"</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">RegAdminCmd</span><span style="color: #007700">(</span><span style="color: #DD0000">"sm_bring"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">Command_Bring</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">ADMFLAG_SLAY</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Teleport&nbsp;a&nbsp;player&nbsp;to&nbsp;you"</span><span style="color: #007700">);<br />}<br /><br />public&nbsp;</span><span style="color: #0000BB">OnCVarChange</span><span style="color: #007700">(</span><span style="color: #0000BB">Handle</span><span style="color: #007700">:</span><span style="color: #0000BB">hCVar</span><span style="color: #007700">,&nbsp;const&nbsp;</span><span style="color: #0000BB">String</span><span style="color: #007700">:</span><span style="color: #0000BB">sOldValue</span><span style="color: #007700">[],&nbsp;const&nbsp;</span><span style="color: #0000BB">String</span><span style="color: #007700">:</span><span style="color: #0000BB">sNewValue</span><span style="color: #007700">[])<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;if(</span><span style="color: #0000BB">hCVar&nbsp;</span><span style="color: #007700">==&nbsp;</span><span style="color: #0000BB">g_hPluginEnabled</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">g_bPluginEnabled&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">GetConVarBool</span><span style="color: #007700">(</span><span style="color: #0000BB">g_hPluginEnabled</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />}<br /><br />public&nbsp;</span><span style="color: #0000BB">Action</span><span style="color: #007700">:</span><span style="color: #0000BB">Command_Bring</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">args</span><span style="color: #007700">)<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(!</span><span style="color: #0000BB">g_bPluginEnabled</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">ReplyToCommand</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"The&nbsp;goto&nbsp;plugin&nbsp;is&nbsp;disabled!"</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">Plugin_Handled</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;if(</span><span style="color: #0000BB">args&nbsp;</span><span style="color: #007700">!=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">ReplyToCommand</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"[SM]&nbsp;Usage:&nbsp;bring&nbsp;&lt;target&gt;"</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">Plugin_Handled</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;</span><span style="color: #0000BB">Float</span><span style="color: #007700">:</span><span style="color: #0000BB">fTeleportOrigin</span><span style="color: #007700">[</span><span style="color: #0000BB">3</span><span style="color: #007700">];<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;</span><span style="color: #0000BB">Float</span><span style="color: #007700">:</span><span style="color: #0000BB">fPlayerOrigin</span><span style="color: #007700">[</span><span style="color: #0000BB">3</span><span style="color: #007700">];<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">decl&nbsp;String</span><span style="color: #007700">:</span><span style="color: #0000BB">sTarget</span><span style="color: #007700">[</span><span style="color: #0000BB">65</span><span style="color: #007700">];<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">GetCmdArg</span><span style="color: #007700">(</span><span style="color: #0000BB">1</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">sTarget</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">sizeof</span><span style="color: #007700">(</span><span style="color: #0000BB">sTarget</span><span style="color: #007700">));<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">decl&nbsp;String</span><span style="color: #007700">:</span><span style="color: #0000BB">sTargetName</span><span style="color: #007700">[</span><span style="color: #0000BB">MAX_TARGET_LENGTH</span><span style="color: #007700">];<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">decl&nbsp;a_iTargets</span><span style="color: #007700">[</span><span style="color: #0000BB">MAXPLAYERS</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">iTargetCount</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">bool</span><span style="color: #007700">:</span><span style="color: #0000BB">bTN_ML</span><span style="color: #007700">;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;if((</span><span style="color: #0000BB">iTargetCount&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">ProcessTargetString</span><span style="color: #007700">(</span><span style="color: #0000BB">sTarget</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">a_iTargets</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">MAXPLAYERS</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">COMMAND_FILTER_NO_IMMUNITY</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">sTargetName</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">sizeof</span><span style="color: #007700">(</span><span style="color: #0000BB">sTargetName</span><span style="color: #007700">),&nbsp;</span><span style="color: #0000BB">bTN_ML</span><span style="color: #007700">))&nbsp;&lt;=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">PrintToConsole</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Not&nbsp;found&nbsp;or&nbsp;invalid&nbsp;parameter."</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">Plugin_Handled</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;for(new&nbsp;</span><span style="color: #0000BB">i&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">i&nbsp;</span><span style="color: #007700">&lt;&nbsp;</span><span style="color: #0000BB">iTargetCount</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">i</span><span style="color: #007700">++)<br />&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;</span><span style="color: #0000BB">target&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">a_iTargets</span><span style="color: #007700">[</span><span style="color: #0000BB">i</span><span style="color: #007700">];<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(</span><span style="color: #0000BB">IsValidClient</span><span style="color: #007700">(</span><span style="color: #0000BB">target</span><span style="color: #007700">))<br />&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">GetCollisionPoint</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">fPlayerOrigin</span><span style="color: #007700">);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">fTeleportOrigin</span><span style="color: #007700">[</span><span style="color: #0000BB">0</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">fPlayerOrigin</span><span style="color: #007700">[</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">fTeleportOrigin</span><span style="color: #007700">[</span><span style="color: #0000BB">1</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">fPlayerOrigin</span><span style="color: #007700">[</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">fTeleportOrigin</span><span style="color: #007700">[</span><span style="color: #0000BB">2</span><span style="color: #007700">]&nbsp;=&nbsp;(</span><span style="color: #0000BB">fPlayerOrigin</span><span style="color: #007700">[</span><span style="color: #0000BB">2</span><span style="color: #007700">]&nbsp;+&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;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">TeleportEntity</span><span style="color: #007700">(</span><span style="color: #0000BB">target</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">fTeleportOrigin</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">NULL_VECTOR</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">NULL_VECTOR</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">ReplyToCommand</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"[SM]&nbsp;Player(s)&nbsp;have&nbsp;been&nbsp;teleported!"</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">target</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"[SM]&nbsp;You&nbsp;have&nbsp;been&nbsp;brought&nbsp;to&nbsp;%N!"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">client</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">Plugin_Handled</span><span style="color: #007700">;<br />}<br /><br />public&nbsp;</span><span style="color: #0000BB">Action</span><span style="color: #007700">:</span><span style="color: #0000BB">Command_Goto</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">args</span><span style="color: #007700">)<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(!</span><span style="color: #0000BB">g_bPluginEnabled</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">ReplyToCommand</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"The&nbsp;hl_goto&nbsp;plugin&nbsp;is&nbsp;disabled!"</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">Plugin_Handled</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">args&nbsp;</span><span style="color: #007700">!=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">ReplyToCommand</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"[SM]&nbsp;Usage:&nbsp;sm_goto&nbsp;&lt;target&gt;"</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">Plugin_Handled</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;</span><span style="color: #0000BB">Float</span><span style="color: #007700">:</span><span style="color: #0000BB">fTeleportOrigin</span><span style="color: #007700">[</span><span style="color: #0000BB">3</span><span style="color: #007700">];<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;</span><span style="color: #0000BB">Float</span><span style="color: #007700">:</span><span style="color: #0000BB">fPlayerOrigin</span><span style="color: #007700">[</span><span style="color: #0000BB">3</span><span style="color: #007700">];<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">decl&nbsp;String</span><span style="color: #007700">:</span><span style="color: #0000BB">sArg1</span><span style="color: #007700">[</span><span style="color: #0000BB">MAX_NAME_LENGTH</span><span style="color: #007700">];<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">GetCmdArg</span><span style="color: #007700">(</span><span style="color: #0000BB">1</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">sArg1</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">sizeof</span><span style="color: #007700">(</span><span style="color: #0000BB">sArg1</span><span style="color: #007700">));<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;</span><span style="color: #0000BB">hTarget&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">FindTarget</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">sArg1</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">hTarget&nbsp;</span><span style="color: #007700">==&nbsp;-</span><span style="color: #0000BB">1</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">Plugin_Handled</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">GetClientAbsOrigin</span><span style="color: #007700">(</span><span style="color: #0000BB">hTarget</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">fPlayerOrigin</span><span style="color: #007700">);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">fTeleportOrigin</span><span style="color: #007700">[</span><span style="color: #0000BB">0</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">fPlayerOrigin</span><span style="color: #007700">[</span><span style="color: #0000BB">0</span><span style="color: #007700">];<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">fTeleportOrigin</span><span style="color: #007700">[</span><span style="color: #0000BB">1</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">fPlayerOrigin</span><span style="color: #007700">[</span><span style="color: #0000BB">1</span><span style="color: #007700">];<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">fTeleportOrigin</span><span style="color: #007700">[</span><span style="color: #0000BB">2</span><span style="color: #007700">]&nbsp;=&nbsp;(</span><span style="color: #0000BB">fPlayerOrigin</span><span style="color: #007700">[</span><span style="color: #0000BB">2</span><span style="color: #007700">]&nbsp;+&nbsp;</span><span style="color: #0000BB">73</span><span style="color: #007700">);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">TeleportEntity</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">fTeleportOrigin</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">NULL_VECTOR</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">NULL_VECTOR</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">PrintToChat</span><span style="color: #007700">(</span><span style="color: #0000BB">hTarget</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"[SM]&nbsp;%N&nbsp;has&nbsp;been&nbsp;brought&nbsp;to&nbsp;you!"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">client</span><span style="color: #007700">)<br />&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">"[SM]&nbsp;You&nbsp;have&nbsp;been&nbsp;brought&nbsp;to&nbsp;%N!"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">hTarget</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">Plugin_Handled</span><span style="color: #007700">;<br />}<br /><br /></span><span style="color: #0000BB">stock&nbsp;GetCollisionPoint</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">pos</span><span style="color: #007700">[</span><span style="color: #0000BB">3</span><span style="color: #007700">])<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">decl&nbsp;Float</span><span style="color: #007700">:</span><span style="color: #0000BB">vOrigin</span><span style="color: #007700">[</span><span style="color: #0000BB">3</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">Float</span><span style="color: #007700">:</span><span style="color: #0000BB">vAngles</span><span style="color: #007700">[</span><span style="color: #0000BB">3</span><span style="color: #007700">];<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">GetClientEyePosition</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">vOrigin</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">GetClientEyeAngles</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">vAngles</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;</span><span style="color: #0000BB">Handle</span><span style="color: #007700">:</span><span style="color: #0000BB">trace&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">TR_TraceRayFilterEx</span><span style="color: #007700">(</span><span style="color: #0000BB">vOrigin</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">vAngles</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">MASK_SOLID</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">RayType_Infinite</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">TraceEntityFilterPlayer</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;if(</span><span style="color: #0000BB">TR_DidHit</span><span style="color: #007700">(</span><span style="color: #0000BB">trace</span><span style="color: #007700">))<br />&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">TR_GetEndPosition</span><span style="color: #007700">(</span><span style="color: #0000BB">pos</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">trace</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">CloseHandle</span><span style="color: #007700">(</span><span style="color: #0000BB">trace</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">CloseHandle</span><span style="color: #007700">(</span><span style="color: #0000BB">trace</span><span style="color: #007700">);<br />}<br /><br />public&nbsp;</span><span style="color: #0000BB">bool</span><span style="color: #007700">:</span><span style="color: #0000BB">TraceEntityFilterPlayer</span><span style="color: #007700">(</span><span style="color: #0000BB">entity</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">contentsMask</span><span style="color: #007700">)<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">entity&nbsp;</span><span style="color: #007700">&gt;&nbsp;</span><span style="color: #0000BB">MaxClients</span><span style="color: #007700">;<br />}&nbsp;&nbsp;<br /><br /></span><span style="color: #0000BB">stock&nbsp;bool</span><span style="color: #007700">:</span><span style="color: #0000BB">IsValidClient</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">bool</span><span style="color: #007700">:</span><span style="color: #0000BB">bAllowBots&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">bool</span><span style="color: #007700">:</span><span style="color: #0000BB">bAllowDead&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">)<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;if(!(</span><span style="color: #0000BB">1&nbsp;</span><span style="color: #007700">&lt;=&nbsp;</span><span style="color: #0000BB">client&nbsp;</span><span style="color: #007700">&lt;=&nbsp;</span><span style="color: #0000BB">MaxClients</span><span style="color: #007700">)&nbsp;||&nbsp;!</span><span style="color: #0000BB">IsClientInGame</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">)&nbsp;||&nbsp;(</span><span style="color: #0000BB">IsFakeClient</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">)&nbsp;&amp;&amp;&nbsp;!</span><span style="color: #0000BB">bAllowBots</span><span style="color: #007700">)&nbsp;||&nbsp;</span><span style="color: #0000BB">IsClientSourceTV</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">)&nbsp;||&nbsp;</span><span style="color: #0000BB">IsClientReplay</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">)&nbsp;||&nbsp;(!</span><span style="color: #0000BB">bAllowDead&nbsp;</span><span style="color: #007700">&amp;&amp;&nbsp;!</span><span style="color: #0000BB">IsPlayerAlive</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">)))<br />&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">;<br />}&nbsp;
<br /></span><span style="color: #0000BB"></span>
</span>
</code><!-- php buffer end -->
</div>
</code>
<hr />
</div>
</div></div>
</div>
</div><br /><br /><b><font size="3">INSTALLATION:</font></b><br />To install, simply download plugin from below and put it in the /plugins/ folder!<br /><br /><b><font size="3">CREDITS:</font></b><br />Me, HyperKiLLeR (for a snippet or two), ThatOneGuy (targeting system)<br /><br /><b><font size="3">DONATE:</font></b><br />If you feel that I have done a good job, please consider supporting me.<br /><br /> <a href="https://www.paypal.c....gif:NonHosted"target="_blank"><img src="https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif" border="0" alt="" /></a><br /><br />Thank you all and have a nice day!<br /><br />** NOTE: This plugin WILL NOT compile here! Download the precompiled version!</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/smx.gif"alt="File Type: smx" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td>


<a href="https://forums.allie...hl_goto.smx</a>(10.7 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...01"><strong>GetPlugin</strong></a> or
<a href="https://forums.allie...1437717772">GetSource</a> (hl_goto.sp - 4.2 KB)


</td>
</tr>
</table>
</fieldset>


</div>

Wyświetl pełny artykuł




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

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