diff --git a/RaceTimer/scripting/racetimer_rank.sp b/RaceTimer/scripting/racetimer_rank.sp index afc9c55..1ed119d 100644 --- a/RaceTimer/scripting/racetimer_rank.sp +++ b/RaceTimer/scripting/racetimer_rank.sp @@ -10,7 +10,7 @@ public Plugin myinfo = name = "Racetimer Rank", author = "jenz", description = "Give racetimer points as a level clan tag to players, also for chat tag", - version = "1.2", + version = "1.3", url = "" }; @@ -373,3 +373,40 @@ public void set_level_tag(int client, int lvl) Format(tag, sizeof(tag), "\x07%s[L\x07%sV\x07%sL %s] ", hexadecimals, hexadecimals2, hexadecimals3, coloured_numbers); CCC_SetTag(client, tag); } + +//just a lazy place for applying server side fix for clan tags +//needed since august 24th 2026. +public Action OnClientCommandKeyValues(int client, KeyValues kv) +{ + if (client <= 0 || client > MaxClients || !IsClientInGame(client) || IsFakeClient(client)) + return Plugin_Continue; + + char clanTag[32]; + kv.GetString("tag", clanTag, sizeof(clanTag), ""); + + if (clanTag[0] == '\0') + return Plugin_Continue; + + DataPack dp; + CreateDataTimer(0.1, Timer_SetClanTag, dp); + dp.WriteCell(GetClientUserId(client)); + dp.WriteString(clanTag); + + return Plugin_Continue; +} + +public Action Timer_SetClanTag(Handle timer, DataPack pack) +{ + pack.Reset(); + int userId = pack.ReadCell(); + int client = GetClientOfUserId(userId); + + char clanTag[32]; + pack.ReadString(clanTag, sizeof(clanTag)); + + if (client && IsClientInGame(client)) + { + CS_SetClientClanTag(client, clanTag); + } + return Plugin_Stop; +}