I have some code to disable glow survivor but keep name
PHP Code:
bool bGlowDisabled[MAXPLAYERS+1];
public void OnPluginStart()
{
RegAdminCmd("sm_survivor_glow", ToggleSurvivorGlow, ADMFLAG_ROOT, "Toggles the survivor glow");
}
public Action ToggleSurvivorGlow(int client, int args)
{
if (client == 0 || !IsClientInGame(client))
{
return Plugin_Handled;
}
for (int i = 1; i <= MaxClients; i++)
{
if (IsClientInGame(i) && GetClientTeam(i) == 2 && IsPlayerAlive(i))
{
if (!bGlowDisabled[i] && GetEntProp(i, Prop_Send, "m_bSurvivorGlowEnabled") == 1)
{
bGlowDisabled[i] = true;
SetEntProp(i, Prop_Send, "m_bSurvivorGlowEnabled", 0);
}
else if (bGlowDisabled[i] && GetEntProp(i, Prop_Send, "m_bSurvivorGlowEnabled") == 0)
{
bGlowDisabled[i] = false;
SetEntProp(i, Prop_Send, "m_bSurvivorGlowEnabled", 1);
}
}
}
return Plugin_Handled;
}
This plugin works.
But when someone else connect, create a new bot. A new bot still have glow. I tried disabled and enabled with sm_survivor_glow but is not working. Anybody can fix it ? Please help me
P/s: Nvm, i fixed it