Raised This Month: $51 Target: $400
 12% 

Pls help Me In sourcemod


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
XTreme_Killer
Junior Member
Join Date: Dec 2020
Old 12-16-2020 , 00:43   Pls help Me In sourcemod
Reply With Quote #1

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);
}

Last edited by XTreme_Killer; 12-16-2020 at 00:45. Reason: To let people see color
XTreme_Killer is offline
PC Gamer
Veteran Member
Join Date: Mar 2014
Old 12-16-2020 , 02:27   Re: Pls help Me In sourcemod
Reply With Quote #2

Welcome to the Forum!

Pro Tips:
1. If you want help you should state the game you want help in. SourceMod is used in many games.
2. If you want help you should ask a question.
3. If you want help with code you should post in the scripting section.
4. If you want help with code you should post all of your code, or at least the relevant parts of your code.
5. If you want help with code you should state what your code currently does, and what you want it to do.
6. If you want help resolving errors with your code you should share your error log.
PC Gamer is offline
XTreme_Killer
Junior Member
Join Date: Dec 2020
Old 12-16-2020 , 02:32   Re: Pls help Me In sourcemod
Reply With Quote #3

Quote:
Originally Posted by PC Gamer View Post
Welcome to the Forum!

Pro Tips:
1. If you want help you should state the game you want help in. SourceMod is used in many games.
2. If you want help you should ask a question.
3. If you want help with code you should post in the scripting section.
4. If you want help with code you should post all of your code, or at least the relevant parts of your code.
5. If you want help with code you should state what your code currently does, and what you want it to do.
6. If you want help resolving errors with your code you should share your error log.
Thanks I am new to alliedmods forum
XTreme_Killer is offline
PC Gamer
Veteran Member
Join Date: Mar 2014
Old 12-16-2020 , 04:23   Re: Pls help Me In sourcemod
Reply With Quote #4

Try changing the lines with errors from this:
PHP Code:
UnFreezeTimer[AllClient] = CreateTimer(30.0UnFreezePlayerAllClient); //Error LINE 
To this:
PHP Code:
CreateTimer(30.0UnFreezePlayerAllClient); 
PC Gamer is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:36.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode