Всё, работает. Но если игрок админ пишет в say_team то префикс не окрашивается что не так?
Используется <scp>
Как я понял нужно CHATFLAGS_ALL подставить в этот код, но куда?
PHP:
public Action:OnChatMessage(&author, Handle:recipients, String:name[], String:message[])
{
if(GetUserFlagBits(author) & ADMFLAG_RESERVATION)
{
// 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[\x04VIP\x01] \x03%s", name);//Tag+Name color
Format(message, MaxMessageLength, "\x04%s", message);
return Plugin_Changed;
}
return Plugin_Continue;
}
Используется <scp>
PHP:
#define MAXLENGTH_INPUT 128 // Inclues \0 and is the size of the chat input box.
#define MAXLENGTH_NAME 64 // This is backwords math to get compability. Sourcemod has it set at 32, but there is room for more.
#define MAXLENGTH_MESSAGE 256 // This is based upon the SDK and the length of the entire message, including tags, name, : etc.
#define CHATFLAGS_INVALID 0
#define CHATFLAGS_ALL (1<<0)
#define CHATFLAGS_TEAM (1<<1)
#define CHATFLAGS_SPEC (1<<2)
#define CHATFLAGS_DEAD (1<<3)
Как я понял нужно CHATFLAGS_ALL подставить в этот код, но куда?