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

[CS:GO] Final and fancy solution for putting a player in a team on connect


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
joao7yt
Senior Member
Join Date: Nov 2014
Location: Brazil
Old 08-20-2017 , 22:00   [CS:GO] Final and fancy solution for putting a player in a team on connect
Reply With Quote #1

As the Panorama doesn't have a Continue Screen, it's now possible to use the "player_connect_full" HookEvent:

PHP Code:
public void OnPluginStart()
{
    
HookEvent("player_connect_full"Event_PlayerConnectFull);
}

public 
Action Event_PlayerConnectFull(Handle event, const char[] namebool dontBroadcast)
{
    
RequestFrame(SetClientTeamGetEventInt(event"userid"));
}

public 
void SetClientTeam(int userid)
{
    
int client GetClientOfUserId(userid);
    
    
//Do stuff here
    //Now you can check if the client is valid and then put it in a team using CS_SwitchTeam or ChangeClientTeam.

Scaleform legacy:
Spoiler

Last edited by joao7yt; 08-31-2018 at 15:05.
joao7yt is offline
 



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 09:37.


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