Junior Spellweaver
- Joined
- Jan 6, 2014
- Messages
- 175
- Reaction score
- 7
Hello. Before ANYTHING, try to read and understand.
What I want to mean with FLAG is the "DEV / LEGEND" status on the scoreboard (/tab).
To change this, you have to go find this code: if(gUserProfile.ProfileData.AccountType==0)
after that, you will find:
After this, find: void HUDDisplay::addChatMessage(int tabIndex, const char* user, const char* text, uint32_t flags)
You'll find:
----- After building the WarZ.SLN in FINAL BUILD and do RSBuild.exe, everything I got is:
in the database -> Setting AccountType to 0 and isDeveloper to 0
this is what happends! - >
in the database -> Setting AccountType to 2 (survivor)
and isDeveloper to 1 this is what happends- >
P.S: I've been trying to fix this thing a long time (5 days, for sure ^^). My server is working fine, I just need this to make it public. By the way, I use the same files as zTime release.
What I want to mean with FLAG is the "DEV / LEGEND" status on the scoreboard (/tab).
To change this, you have to go find this code: if(gUserProfile.ProfileData.AccountType==0)
after that, you will find:
Code:
if(gUserProfile.ProfileData.AccountType==0)
{
flags|=2;
}
if(gUserProfile.ProfileData.isDevAccount)
{
flags|=3;
}
if(gUserProfile.ProfileData.isPunisher)
{
flags|=4;
}
addChatMessage(currentTabIndex, userName, &s_chatMsg[start_text], flags);
memset(s_chatMsg, 0, sizeof(s_chatMsg));
After this, find: void HUDDisplay::addChatMessage(int tabIndex, const char* user, const char* text, uint32_t flags)
You'll find:
Code:
void HUDDisplay::addChatMessage(int tabIndex, const char* user, const char* text, uint32_t flags)
{
if(!Inited) return;
Scaleform::GFx::Value var[3];
char tmpMsg[1024];
const char* tabNames[] = {"[PROXIMITY]", "[GLOBAL]", "[CLAN]", "[GROUP]"};
const char* tabNamesColor[] = {"#00A000", "#13bbeb", "#de13eb", "#ffa900"};
const char* userNameColor[] = {"#ffffff", "#ffa800"};
bool isUserLegend = (flags&1)?true:false;
bool isUserPunisher = (flags&2)?true:false;
bool isUserDev = (flags&3)?true:false;
const char* userColor = userNameColor[isUserLegend?0:1];
const char* textColor = "#d0d0d0";
const char* namePrefix = "";
if(isUserPunisher && !isUserDev)
{
userColor = "#ff0000";
textColor = "#ff8800";
namePrefix = "<Punisher>";
}
if(isUserDev)
{
userColor = "#ffff00";
textColor = "#ffff00";
namePrefix = "<DEV>";
}
// dirty stl :)
std::string sUser = user;
int pos = 0;
while((pos= sUser.find('<'))!=-1)
sUser.replace(pos, 1, "<");
while((pos = sUser.find('>'))!=-1)
sUser.replace(pos, 1, ">");
std::string sMsg = text;
while((pos = sMsg.find('<'))!=-1)
sMsg.replace(pos, 1, "<");
while((pos = sMsg.find('>'))!=-1)
sMsg.replace(pos, 1, ">");
// really simple profanity filter
{
int counter = 0;
char profanityFilter[2048]={0};
char clearString[2048]={0};
r3dscpy(profanityFilter, sMsg.c_str());
char* word = strtok(profanityFilter, " ");
while(word)
{
if(dictionaryHash_.IsExists(word))
{
r3dscpy(&clearString[counter], "*** ");
counter +=4;
}
else
{
r3dscpy(&clearString[counter], word);
counter +=strlen(word);
clearString[counter++] = ' ';
}
word = strtok(NULL, " ");
}
clearString[counter++] = 0;
sMsg = clearString;
}
sprintf(tmpMsg, "<font color=\"%s\">%s</font> <font color=\"%s\">%s%s:</font> <font color=\"%s\">%s</font>", tabNamesColor[tabIndex], tabNames[tabIndex], userColor, namePrefix, sUser.c_str(), textColor, sMsg.c_str());
var[0].SetString(tmpMsg);
gfxHUD.Invoke("_root.api.receiveChat", var, 1);
}
----- After building the WarZ.SLN in FINAL BUILD and do RSBuild.exe, everything I got is:
in the database -> Setting AccountType to 0 and isDeveloper to 0
this is what happends! - >
You must be registered to see links
in the database -> Setting AccountType to 2 (survivor)
and isDeveloper to 1 this is what happends- >
You must be registered to see links
P.S: I've been trying to fix this thing a long time (5 days, for sure ^^). My server is working fine, I just need this to make it public. By the way, I use the same files as zTime release.
Last edited: