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

[CS:GO]Force Team Join (Player(CT)/BOT(T))


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Xezy
New Member
Join Date: Apr 2016
Location: Korea, Republic Of
Old 04-12-2016 , 06:58   [CS:GO]Force Team Join (Player(CT)/BOT(T))
Reply With Quote #1

What it does?
- The plugin set player's team to Counter-Terrorist, Bot's team to Terrorist.
- If player trying to join Terrorist, player will be moved to Counter-Terrorist by force.

Source Code
Code:
new Collision_Offsets;

public OnPluginStart()
{
	Collision_Offsets = FindSendPropInfo("CBaseEntity", "m_CollisionGroup");
	HookEvent("player_spawn", PlayerSpawn);
}

public Action:PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
{
	new client = GetClientOfUserId(GetEventInt(event, "userid"));
	if(IsFakeClient(client) && GetClientTeam(client) > 1)
	{
		ChangeClientTeam(client, 2);
		CS_RespawnPlayer(client);
		
		SetEntData(client, Collision_Offsets, 2, 1, true);
	}
	
	if(!IsFakeClient(client) && GetClientTeam(client) == 2)
	{
		ChangeClientTeam(client, 3);
		CS_RespawnPlayer(client);
		
		SetEntData(client, Collision_Offsets, 2, 1, true);
	}

}
Attached Files
File Type: sp Get Plugin or Get Source (btpct.sp - 956 views - 949 Bytes)
File Type: smx btpct.smx (4.3 KB, 391 views)
Xezy is offline
[email protected]
Member
Join Date: Mar 2016
Old 04-20-2016 , 08:20   Re: [CS:GO]Force Team Join (Player(CT)/BOT(T))
Reply With Quote #2

GOOD!!!
Thanks
water19753@gmail.com 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 01:21.


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