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

[CSS] Change team event


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ReyZ
Junior Member
Join Date: Oct 2020
Old 06-21-2021 , 11:37   [CSS] Change team event
Reply With Quote #1

When player is death and joins spectator team then joins again terrorist team player will respawn i wan't to disable that (only happnes in hg_ maps)

Code:
new specrev = 0
public void OnPluginStart()
{
	HookEvent("round_start", OnRoundStart, EventHookMode_PostNoCopy);
	HookEvent("player_team", EventPlayerTeam);
}

public Action EventPlayerTeam(Event event, const char[] name, bool dontBroadcast)
{
	if (team == 2) {
		if (specrev = 0) {
			ServerCommand("say test");
		}
	}
}

public OnRoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
	decl String:mapname[128];
	GetCurrentMap(mapname, sizeof(mapname));
	  
	if (StrContains(mapname, "hg_", false) == 0)
	{
		specrev = 1;
		CreateTimer(30.0, hg);
	}
}

public Action hg(Handle timer)
{
	specrev = 0
}
Not works
ReyZ 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 10:47.


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