Hexer10 / HexTags

Customize tags & chat colors!
https://forums.alliedmods.net/showthread.php?p=2566623
GNU General Public License v3.0
54 stars 16 forks source link

After connection {country} tag (with fix) #10

Closed ghost closed 5 years ago

ghost commented 5 years ago

After the connection you have "{country}" tag while the round not ends... I made a test with a fix and it works perfectly.

Just simply add to the code:

public void OnClientPutInServer(int client)
{
    LoadTags(client);

    //Update params
    char sIP[32];
    char sCountry[3];
    GetClientIP(client, sIP, sizeof(sIP));
    GeoipCode2(sIP, sCountry);
    ReplaceString(sTags[client][ScoreTag], sizeof(sTags[][]), "{country}", sCountry);

    if (strlen(sTags[client][ScoreTag]) > 0 && IsCS())
        CS_SetClientClanTag(client, sTags[client][ScoreTag]); //Instantly load the score-tag
}
Hexer10 commented 5 years ago

Thanks for reporting! I can reproduce this. It would be nice if you could make a pr, if not I'll probably do this tomorrow.