<!-- BEGIN TEMPLATE: postbit_external -->
<div>This plugin allows server operators to set a cooldown on any command registered with RegAdminCmd or RegConsoleCmd, without editing the plugin's code and recompiling. This plugin will not (yet) function on "commands" that have been "created" with AddCommandListener.<br /><br /><br />Commands to set cooldowns on must be specified in addons/sourcemod/configs/commandCooldowns.txt. The file utilizes standard KeyValues structure, and should look as follows:<br /><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_code_printable -->
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px">Code:</div>
<hr /><code style="margin:0px" dir="ltr" style="text-align:left">"CommandCooldowns"<br />{<br /> "sm_noclip"<br /> {<br /> "cooldown" "10"<br /> "allowOverride" "1"<br /> "override" "noclip_bypasscooldown"<br /> }<br /> "sm_god"<br /> {<br /> "cooldown" "5"<br /> "allowOverride" "1"<br /> "defaultFlag" "k"<br /> }<br /> "sm_resizemyhead"<br /> {<br /> "cooldown" "15"<br /> "allowOverride" "1"<br /> "override" "sm_resizehead"<br /> "defaultFlag" "a"<br /> }<br /> "sm_pumpkin"<br /> {<br /> "cooldown" "5.5"<br /> }<br />}</code><hr />
</div>
<!-- END TEMPLATE: bbcode_code_printable -->In the above example, 4 commands have been given cooldowns of various lengths.<br /><ol style="list-style-type: decimal"><li><b>sm_noclip</b> has been given a cooldown of 10 seconds. <b>"allowOverride" "1"</b> has been specified, so the plugin will allow certain users to bypass the cooldown. Any user with access to the <a href="https://wiki.alliedm...cess_(SourceMod)" target="_blank">override</a> "noclip_bypasscooldown" will be able to get around the cooldown. However, since no defaultFlags have been specified, if "noclip_bypasscooldown" <u>cannot be found</u> in the overrides, EVERYONE will be able to get around the cooldown.</li>
<li><b>sm_god</b> has been given a cooldown of 5 seconds. allowOverride is set to 1, so some users can bypass this. Any user with the 'K' flag can bypass it.</li>
<li><b>sm_resizemyhead</b> has been given a cooldown of 15 seconds. Overrides are allowed. Any user who can use sm_resizehead can get around the cooldown. If sm_resizehead does not exist, then the 'A' flag is used instead.</li>
<li><b>sm_pumpkin</b> has been given a cooldown of 5 and a half seconds. allowOverride has not been specified, so no one can get around the cooldown, not even root admins.</li>
</ol></div>
</div>
</div><br /><br />This plugin supports automatic updating through <a href="https://forums.allie...ad.php?t=169095" target="_blank">Updater</a>. Please consider installing Updater, if you haven't already. Automatic updating can be disabled by setting sm_namechangeinfo_update to "0".<br /><br />The plugin requires the <a href="http://ddhoward.bitbucket.org/scripting/include/updater.inc" target="_blank">updater.inc</a> include. As such, it does not compile here on the forums. You can either download and install the attached SMX, or download the SP and compile it yourself.<br /><br /><br /><font size="1"><div align="center">If you like what you see here, please consider donating~<br /><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=39U5GXQKNXQJY&lc=US&item_name=Derek%20D%2e%20Howard&item_number=Command%20Cooldowns&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted" target="_blank"><img src="http://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif" border="0" alt="" /></a></div></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.../attach/smx.gif" alt="File Type: smx" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td>
<a href="https://forums.allie...38;d=1392520354">commandCooldowns.smx</a> (7.3 KB)
</td>
</tr>
<!-- END TEMPLATE: postbit_attachment --><!-- 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=130662"><strong>Get Plugin</strong></a> or
<a href="https://forums.allie...38;d=1392520359">Get Source</a> (commandCooldowns.sp - 3.7 KB)
</td>
</tr>
<!-- END TEMPLATE: postbit_attachment --><!-- BEGIN TEMPLATE: postbit_attachment -->
<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...38;d=1392520364">commandCooldowns (example).txt</a> (388 Bytes)
</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

[Any] Command Cooldowns
Temat rozp. Adminek AMXX.PL, 16.02.2014 04:12
Brak odpowiedzi do tego tematu
Użytkownicy przeglądający ten temat: 0
0 użytkowników, 0 gości, 0 anonimowych