Code:
public Action Pause_game(int client, int args)
{
gCV_WScore = FindConVar("wm_status");
int status = gCV_WScore.IntValue
gCV_TScore = FindConVar("wm_t_score");
int tScore = gCV_TScore.IntValue;
gCV_CTScore = FindConVar("wm_ct_score");
int ctScore = gCV_CTScore.IntValue;
if(args == 0)
{
if (status == 0)
{
PrintHintTextToAll("Waiting For Match. Type !fs to Force Start", ctScore, tScore);
}
else if (status > 4)
{
if(GetClientTeam(client) == 1)
{
PrintToChat(client, "You must be in a team to pause the game");
}
else if(GetClientTeam(client) == 2)
{
for (new i = 1; i <= MaxClients; i++)
{
new AllClient = GetClientSerial(i);
FreezePlayer(AllClient);
UnFreezeTimer[AllClient] = CreateTimer(30.0, UnFreezePlayer, AllClient); //Error LINE
}
}
else if(GetClientTeam(client) == 3)
{
for (new i = 1; i <= MaxClients; i++)
{
new AllClient = GetClientSerial(i);
FreezePlayer(AllClient);
UnFreezeTimer[AllClient] = CreateTimer(30.0, UnFreezePlayer, AllClient); //Error LINE
}
}
}
}
}
public FreezePlayer(client)
{
SetEntPropFloat(client, Prop_Data, "m_flLaggedMovementValue", 0.0);
SetEntityRenderColor(client, 255, 0, 170, 174);
}
public UnFreezePlayer(Handle timer, client)
{
SetEntPropFloat(client, Prop_Data, "m_flLaggedMovementValue", 1.0);
SetEntityRenderColor(client, 255, 255, 255, 255);
}