<div><font face="Comic Sans MS"><b><font size="6"><div align="center"><font color="#FF0000"><</font> <font color="#0000BF"> OciXCrom's Admin Chat</font> <font color="#FF0000">></font></div></font></b><br /><div align="center"><font color="#FF0000"><b>A new and improved version of the default admin chat plugin. The plugin is fully rewritten and adds some new commands and options and simplified ways for using the old and new ones.</b></font></div><br /><b><font size="6"><u><font color="#0000BF">Pros and Cons:</font></u></font></b><br /><br /><ul><li><b><font color="blue">Pros</font></b>:<ul><li>Colored messages.</li>
<li>Ability to modify every single message.</li>
<li>Shortcuts for a more simple usage of the commands.</li>
<li>A console command for the admin chat (say_team @).</li>
<li>Console commands for all different HUD positions (say @/@@/@@@).</li>
<li>Ability to send a message on the right side of the screen.</li>
<li>Ability to type in different colors.</li>
<li>Admins can read other players' private messages.</li>
<li>Added a sound when a player receives a private message.</li>
<li>Ability to send DHUD messages.</li>
<li>Ability to hide the player's nickname in certain messages.</li>
</ul></li>
<li><b><font color="red">Cons</font></b>: none!</li>
</ul><br /><br /><b><font size="6"><u><font color="#0000BF">Commands list:</font></u></font></b><br /><br /><ul><li><b><font color="red">amx_say</font> <font color="#0080FF"><message></font></b> - <i>(All Chat) Sends a message to all players.</i><ul><li><b>Shortcut</b>: say #<message></li>
<li><b>Default flag</b>: "i"</li>
</ul></li>
<li><b><font color="red">amx_asay</font> <font color="#0080FF"><message></font></b> - <i>(Admin Chat) Sends a message to all admins. The prefix depends on your admin level - admins get (ADMIN), VIPs (any flag) get (VIP) and normal players get a (PLAYER) prefix.</i><ul><li><b>Shortcut</b>: say_team @<message></li>
<li><b>Default flag</b>: all players can use the command, but only the ones with flag "e" can read the messages</li>
</ul></li>
<li><b><font color="red">amx_chat</font> <font color="#0080FF"><message></font></b> - <i>(VIP Chat) Sends a message to all VIP users..</i><ul><li><b>Shortcut</b>: say_team !<message></li>
<li><b>Default flag</b>: "i"</li>
</ul></li>
<li><b><font color="red">amx_psay</font> <font color="#0080FF"><player> <message></font></b> - <i>(Private Message) Sends a private message to a player. The player also hears a sound, so he can pay attention to the received message.</i><ul><li><b>Shortcut</b>: say_team #<player> <message></li>
<li><b>Default flag</b>: players with flag "i" have access to the command, and players with flag "d" can read other players' messages</li>
</ul></li>
<li><b><font color="red">amx_tsay</font> <font color="#0080FF"><color> <message></font></b> - <i>(Left HUD) Sends a HUD message on the left side of the screen.</i><ul><li><b>Shortcut</b>: say_team @<color> <message></li>
<li><b>Default flag</b>: "i"</li>
</ul></li>
<li><b><font color="red">amx_csay</font> <font color="#0080FF"><color> <message></font></b> - <i>(Center HUD) Sends a HUD message on top of the screen.</i><ul><li><b>Shortcut</b>: say_team @@<color> <message></li>
<li><b>Default flag</b>: "i"</li>
</ul></li>
<li><b><font color="red">amx_bsay</font> <font color="#0080FF"><color> <message></font></b> - <i>(Bottom HUD) Sends a HUD message on the bottom of the screen..</i><ul><li><b>Shortcut</b>: say_team @@@<color> <message></li>
<li><b>Default flag</b>: "i"</li>
</ul></li>
<li><b><font color="red">amx_rsay</font> <font color="#0080FF"><color> <message></font></b> - <i>(Right HUD) Sends a HUD message on the right side of the screen..</i><ul><li><b>Shortcut</b>: say_team @@@@<color> <message></li>
<li><b>Default flag</b>: "i"</li>
</ul></li>
<li><b><font color="red">amx_tsay2</font> <font color="#0080FF"><color> <message></font></b> - <i>(Left DHUD) Sends a DHUD message on the left side of the screen.</i><ul><li><b>Shortcut</b>: say_team &<color> <message></li>
<li><b>Default flag</b>: "l"</li>
</ul></li>
<li><b><font color="red">amx_csay2</font> <font color="#0080FF"><color> <message></font></b> - <i>(Center DHUD) Sends a DHUD message on top of the screen.</i><ul><li><b>Shortcut</b>: say_team &&<color> <message></li>
<li><b>Default flag</b>: "l"</li>
</ul></li>
<li><b><font color="red">amx_bsay2</font> <font color="#0080FF"><color> <message></font></b> - <i>(Bottom DHUD) Sends a DHUD message on the bottom of the screen.</i><ul><li><b>Shortcut</b>: say_team &&&<color> <message></li>
<li><b>Default flag</b>: "l"</li>
</ul></li>
<li><b><font color="red">amx_rsay2</font> <font color="#0080FF"><color> <message></font></b> - <i>(Right DHUD) Sends a DHUD message on the right side of the screen.</i><ul><li><b>Shortcut</b>: say_team &&&&<color> <message></li>
<li><b>Default flag</b>: "l"</li>
</ul> </li>
</ul><br /><br /><b><font size="6"><u><font color="#0000BF">List of colors for HUD/DHUD messages:</font></u></font></b><br /><br /><b><ul><li>white</li>
<li><font color="red">red</font></li>
<li><font color="green">green</font></li>
<li><font color="blue">blue</font></li>
<li><font color="yellow">yellow</font></li>
<li><font color="magenta">magenta</font></li>
<li><font color="cyan">cyan</font></li>
<li><font color="orange">orange</font></li>
<li><font color="lightblue">ocean</font></li>
<li><font color="brown">maroon</font></li>
</ul><br /><br />When using a shortcut command, you need to enter only the first letter of the color. For example: say @r hello - red.</b><br /><br /><b><font size="6"><u><font color="#0000BF">Images:</font></u></font></b><br /><br /><img src="http://i.imgur.com/1kyCVVm.jpg"border="0" alt="" /><br /><img src="http://i.imgur.com/eVifyNZ.jpg" border="0" alt="" /><br /><img src="http://i.imgur.com/kLVNyPr.jpg" border="0" alt="" /><br /><img src="http://i.imgur.com/x7jivXI.jpg" border="0" alt="" /><br /><br /><b><font size="6"><u><font color="#0000BF">How to modify a message:</font></u></font></b><br /><br />To change a message, you need to open the .sma file and find <b>new const g_Messages</b>:<br /><br /><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: #007700">new const </span><span style="color: #0000BB">g_Messages</span><span style="color: #007700">[][] = {
<br /> </span><span style="color: #DD0000">"!g(ALL) !t%name% !n: !g%message%"</span><span style="color: #007700">, </span><span style="color: #FF8000">/* amx_say -- Sends a message to all players */
<br /> </span><span style="color: #DD0000">"!g(%level%!g) %name% !t: !g%message%"</span><span style="color: #007700">, </span><span style="color: #FF8000">/* amx_asay -- Sends a message to all admins */
<br /> </span><span style="color: #DD0000">"!g(VIP CHAT) !t%name% !n: !t%message%"</span><span style="color: #007700">, </span><span style="color: #FF8000">/* amx_chat -- Send a message to VIP users */
<br /> </span><span style="color: #DD0000">"!t(!g%name%!t -> !g%name2%!t) !n%message%"</span><span style="color: #007700">, </span><span style="color: #FF8000">/* amx_psay -- Sends a private message to a player */
<br /> </span><span style="color: #DD0000">"%name% : %message%" </span><span style="color: #FF8000">/* amx_<letter>say(2) -- Sends a (D)HUD message to all players */
<br /></span><span style="color: #007700">}
<br /></span><span style="color: #0000BB"></span>
</span>
</code><!-- php buffer end -->
</div>
</code>
<hr />
</div>
</div>Use <b><font color="#008000">!g for green</font></b>, <b>!<font color="#0000FF">t for a team</font> <font color="#FF0000">colored message</font></b> and <b><font color="#FFBF00">!n for default color</font></b>. You can use %name%, %name2%, %level% and %message% to replace the relevant information.<br /><br /><b><font size="6"><u><font color="#0000BF">Anonymous Mode:</font></u></font></b><br /><br /><b>Anonymous Mode</b> hides the player's nickname in certain messages. The option can be activated by changing the cvar <b>crxchat_anonymous "1"</b>. The messages for this mode can be changed from <b>g_AnonymousMessages</b>:<br /><br /><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: #007700">new const </span><span style="color: #0000BB">g_AnonymousMessages</span><span style="color: #007700">[][] = {
<br /> </span><span style="color: #DD0000">"!g(ALL) !n: !g%message%"</span><span style="color: #007700">, </span><span style="color: #FF8000">/* amx_say -- Sends a message to all players */
<br /> </span><span style="color: #DD0000">"!g(%level%!g) %name% !t: !g%message%"</span><span style="color: #007700">, </span><span style="color: #FF8000">/* amx_asay -- Sends a message to all admins */
<br /> </span><span style="color: #DD0000">"!g(VIP CHAT) !t%name% !n: !t%message%"</span><span style="color: #007700">, </span><span style="color: #FF8000">/* amx_chat -- Send a message to VIP users */
<br /> </span><span style="color: #DD0000">"!t(!g%name%!t -> !g%name2%!t) !n%message%"</span><span style="color: #007700">, </span><span style="color: #FF8000">/* amx_psay -- Sends a private message to a player */
<br /> </span><span style="color: #DD0000">"%message%" </span><span style="color: #FF8000">/* amx_<letter>say(2) -- Sends a (D)HUD message to all players */
<br /></span><span style="color: #007700">}
<br /></span><span style="color: #0000BB"></span>
</span>
</code><!-- php buffer end -->
</div>
</code>
<hr />
</div>
</div>You can change the messages in the same way as shown before.<br /><br /><b><font size="6"><u><font color="#0000BF">How to change flags:</font></u></font></b><br /><br /><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">#define FLAG_ADMIN ADMIN_SLAY /* Flag for "ADMIN" usage */
<br />#define FLAG_PSAY ADMIN_BAN /* Players with this flag can read others players' private messages */
<br />#define FLAG_READ ADMIN_SLAY /* Players with this flag can see the admin chat */
<br />#define FLAG_VIPCHAT ADMIN_CHAT /* Players with this flag can use and read VIP chat messages */
<br /></span><span style="color: #0000BB"></span>
</span>
</code><!-- php buffer end -->
</div>
</code>
<hr />
</div>
</div>The other flags can be changed in the function itself, which registers the command. Search for <b>register_concmd</b>.<br /><br /><b><font size="6"><u><font color="#0000BF">IMPORTANT:</font></u></font></b><br /><br /><ul><li>After every change made in the .sma file, you need to compile the plugin locally and replace the plugin with the new .amxx file.</li>
<li>If you compile the plugin with AMXX 1.8.3, you need to remove <b>#include <dhudmessage></b> from the code.</li>
</ul></font></div>
<br /> <div style="padding:6px">
<fieldset class="fieldset">
<legend>Attached Files</legend>
<table cellpadding="0" cellspacing="3" border="0">
<tr>
<td><img class="inlineimg" src="https://forums.allie...attach/sma.gif"alt="File Type: sma" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td>
<a href="http://www.amxmodx.o...76"><strong>GetPlugin</strong></a> or
<a href="https://forums.allie...1443552935">GetSource</a> (adminchat.sma - 14.6 KB)
</td>
</tr><tr>
<td><img class="inlineimg" src="https://forums.allie...attach/inc.gif"alt="File Type: inc" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td>
<a href="https://forums.allie...message.inc</a>(3.4 KB)
</td>
</tr>
</table>
</fieldset>
</div>
Wyświetl pełny artykuł
Witamy w Nieoficjalnym polskim support'cie AMX Mod X
Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
|
Guest Message by DevFuse

OciXCrom's Admin Chat
Temat rozp. Adminek AMXX.PL, 29.09.2015 19:58
Brak odpowiedzi do tego tematu
Użytkownicy przeglądający ten temat: 1
0 użytkowników, 1 gości, 0 anonimowych