←  [RSS] Pluginy

AMXX.pl: Support AMX Mod X i SourceMod

»

Chat Revamp API V1.2b

Adminek AMXX.PL - zdjęcie Adminek AMXX.PL 17.07.2017

<div>I did not perfectly test it but there isn't a reason it won't work. My current suspicion is that SayText may be sent more than once per chat.<br /><br />This plugin revamps the chat ( say/_team ) and allows with a single forward and a single native, allowing to stop a player from receiving chat from a specific player and even eavesdrop to team chat.<br /><br />Despite being API, there are built in features.<br /><br />API Forward:<br /><br /><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">public client_ChatPrintByPlayer(sender, receiver, bool:WillSend, bool:TeamChat, Message[], MessageTags[])<br /><br />sender = player sending the chat message.<br /><br />receiver = player receiving the chat message.<br /><br />bool:WillSend = true if the message will be sent at all ( might be altered if return 2 is applied, causing eavesdropping of team chat only ).<br /><br />bool:TeamChat = true if the chat is team chat.<br /><br />Message[] = The message the sender wrote that the receiver is going to receive.<br /><br />MessageTags[] = The tags accompanied with the message. Completely useless if you don't wish to block the message with return 1 and use the native to resend the message with censorship for example.<br /><br />return 0 to ignore, return 1 to block the receiver from receiving the chat, return 2 to receive the chat even if it's team chat.</code><hr />
</div>API Native:<br /><br /><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"><br />native print_special_colorchat(index, sender, Message[], MessageTags[]);<br /><br />index = index receiving the message.<br />sender = player sending the message. Used to display his name and team color.<br />Message[] = Message to send. Only this should be altered in general.<br />MessageTags[] = The tags accompanied with the message.</code><hr />
</div>Current functions outside of API:<br /><br /><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"><br />say /blockchat &lt;target&gt; - blocks / unblocks target from chatting to you. Doesn't affect ADMIN_IMMUNITY. You can't send chat messages to blocked targets in addition to receiving them.<br /><br />say /stopchat - blocks / unblocks all chat messages. Doesn't affect chat sent by ADMIN_IMMUNITY.<br /><br />Dead to alive chat modified by cvar.<br /><br />Team chat disable by cvar. In disable of team chat, all team chats are sent as normal chats.<br /><br />Allow blocking players from chatting by cvar.<br /><br />Allow blocking the general chat by cvar.</code><hr />
</div>CVARs:<br /><br />Note: All cvars are set in the beginning of the map.<br /><br /><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">chat_revamp_enabled - Enables entire plugin. Default 1.<br />chat_allow_dead_to_alive - Allows dead player to chat alive players if set to 1. Default 0.<br />chat_allow_team_chat - Allows player to chat to their team if set to 1. Default 1.<br />chat_allow_block - Allows player to block chat from specific players if set to 1. Doesn't apply on sending ADMIN_IMMUNITY. Default 1.<br />chat_allow_stop_chat - Allows player to disable receiving chat. Doesn't apply on sending ADMIN_IMMUNITY. Default 1.</code><hr />
</div>Sorry for giving a plugin that might not even work but it'll take a day for people to evaluate whether or not it's working ( I generally need a server with 2 real players to test it properly ).</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...90"><strong>GetPlugin</strong></a> or
<a href="https://forums.allie...1500487391">GetSource</a> (ChatRevamp.sma - 7.8 KB)

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


</div>

Wyświetl pełny artykuł
Odpowiedz