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

Solved [CSGO] Bypass choose team screen?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Austin
Senior Member
Join Date: Oct 2005
Old 09-16-2021 , 02:53   [CSGO] Bypass choose team screen?
Reply With Quote #1

Can someone show how to automaticially choose a team for a human joining and totally bypass the choose team screen you see when you first connect?
tx

Last edited by Austin; 09-16-2021 at 10:46.
Austin is offline
FAQU
Member
Join Date: Sep 2020
Location: Romania
Old 09-16-2021 , 04:33   Re: [CSGO] Bypass choose team screen?
Reply With Quote #2

PHP Code:
#include <sourcemod>

#pragma semicolon 1
#pragma newdecls required

public void OnPluginStart()
{
    
HookEvent("player_connect_full"Event_PlayerConnectFull); // event fired when the player is fully connected and in-game
}

public 
void Event_PlayerConnectFull(Event event, const char[] namebool dontBroadcast)
{
    
int client GetClientOfUserId(event.GetInt("userid")); // get client from event key "userid"
    
if (client && !GetClientTeam(client)) // check if the client is valid and not assigned to a team yet
    
{
        
ChangeClientTeam(client2); // move client to Terrorists
    
}

__________________
FAQU is offline
Austin
Senior Member
Join Date: Oct 2005
Old 09-16-2021 , 10:50   Re: [CSGO] Bypass choose team screen?
Reply With Quote #3

The plugin that I am working on is

If a human is joining and is the first human joining let them pick the team
else
automaticially put them on the human team

The reason I am not using
mp_humanteam
is I want to allow switching teams once they are on.

If a human switches after joining all humans switch with them.

It works!
This is the part I didn't have.
Exactly what I needed
Thanks!

Last edited by Austin; 09-16-2021 at 10:51.
Austin is offline
Reply


Thread Tools
Display Modes

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:48.


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