PHP Code:
#include <sourcemod>
#include <cstrike>
bool g_bSomething;
public void OnMapStart()
{
CreateTimer(5.0, Timer_Something, _, TIMER_REPEAT | TIMER_FLAG_NO_MAPCHANGE);
}
public Action Timer_Something(Handle hTimer, int iData)
{
for (int i = 1; i <= MaxClients; i++)
{
if (IsValidClient(i))
{
if (g_bSomething)
CS_SetClientClanTag(i, "Hey");
else
CS_SetClientClanTag(i, "Ho");
g_bSomething = !g_bSomething;
}
}
return Plugin_Continue;
}
public bool IsValidClient(int iClient)
{
if (!(0 < iClient <= MaxClients) || !IsClientConnected(iClient) || !IsClientInGame(iClient) || IsFakeClient(iClient))
return false;
return true;
}
Hi. I'm trying to make the clantags change every five seconds, and it works just fine when I'm by myself on the server, but whenever someone else joins, everyone has different clan tags and its like the plugin has entered the "failstate-mode".
the weird think is that it all again works fine when everyone but one player leaves the server
__________________
I do make plugins upon requests, so hit me up on discord if you're interested: Stefan Milivojevic#5311