Senior Member
Join Date: Mar 2017
Location: 127.0.0.1
|
03-30-2020
, 18:43
Re: Change TAG position in chat (CSGO)
|
#3
|
Quote:
Originally Posted by Chrissy
Format the name do have the name before the tag inside of the name string.
This is my code for a tag plugin I made, so take from it what you will:
Code:
public Action CP_OnChatMessage(int& iAuthor, ArrayList hRecipients, char[] sFlagString, char[] sName, char[] sMessage, bool& bProcessColours, bool& bRemoveColours)
{
if(!IsValidClient(iAuthor))
{
return Plugin_Continue;
}
bProcessColours = false;
char sNameBuffer[MAXLENGTH_MESSAGE * 2];
Format(sNameBuffer, sizeof(sNameBuffer), " ");
if(g_bWarden)
{
if(JailbreakWarden_IsWarden(iAuthor))
{
Format(sNameBuffer, sizeof(sNameBuffer), "%s{default}[{darkblue}W{default}] ", sNameBuffer);
}
}
if(g_iTagFlags[iAuthor] & TAG_LOADED && !(g_iTagFlags[iAuthor] & TAG_HIDECUSTOM))
{
Format(sNameBuffer, sizeof(sNameBuffer), "%s{default}[%s{default}] ", sNameBuffer, g_sTagFormatString[iAuthor]);
}
switch(GetClientTeam(iAuthor))
{
case 0, 1:
{
char sRawName[MAX_NAME_LENGTH];
GetClientName(iAuthor, sRawName, sizeof sRawName);
CRemoveColors(sRawName, MAX_NAME_LENGTH);
RemoveColourCodes(sRawName, MAX_NAME_LENGTH);
Format(sNameBuffer, sizeof(sNameBuffer), "%s{default}%s", sNameBuffer, sRawName);
}
default:
{
char sRawName[MAX_NAME_LENGTH];
GetClientName(iAuthor, sRawName, sizeof sRawName);
CRemoveColors(sRawName, MAX_NAME_LENGTH);
RemoveColourCodes(sRawName, MAX_NAME_LENGTH);
Format(sNameBuffer, sizeof(sNameBuffer), "%s{teamcolor}%s", sNameBuffer, sRawName);
}
}
CRemoveColors(sMessage, MAXLENGTH_MESSAGE);
RemoveColourCodes(sMessage, MAXLENGTH_MESSAGE);
Format(sMessage, MAXLENGTH_MESSAGE, "{default}%s", sMessage);
CProcessVariables(sNameBuffer, sizeof(sNameBuffer));
CProcessVariables(sMessage, MAXLENGTH_MESSAGE);
Format(sName, MAXLENGTH_NAME, sNameBuffer);
return Plugin_Changed;
}
I'm using chat processor plugin.
|
I'am trying to find a plugin that make somethins like that! [Admin] FreezerPT: chat here, and I try many plugins, but anyone works! Can you tell me what are you using? Or can you pass me your code pls
__________________
|
|