#include <scp>
public Action:OnChatMessage(&author, Handle:recipients, String:name[], String:message[])
{
if(GetUserFlagBits(author) & ADMFLAG_CUSTOM1)
{
// MAXLENGTH_MESSAGE = maximum characters in a chat message, including name. Subtract the characters in the name, and 5 to account for the colon, spaces, and null terminator
new MaxMessageLength = MAXLENGTH_MESSAGE - strlen(name) - 5;
Format(name, MAXLENGTH_NAME, "\x01[\x06VIP\x01] \x03%s", name);//Tag+Name color
Format(message, MaxMessageLength, "\x04%s", message);
return Plugin_Changed;
}
else if(GetUserFlagBits(author) & ADMFLAG_BAN)
{
// MAXLENGTH_MESSAGE = maximum characters in a chat message, including name. Subtract the characters in the name, and 5 to account for the colon, spaces, and null terminator
new MaxMessageLength = MAXLENGTH_MESSAGE - strlen(name) - 5;
Format(name, MAXLENGTH_NAME, "\x01[\x02admin\x01] \x03%s", name);//Tag+Name color
Format(message, MaxMessageLength, "\x04%s", message);
return Plugin_Changed;
}
return Plugin_Continue;