Raised This Month: $ Target: $400
 0% 

switched from team <Unassigned> to <CT>


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
tair
Junior Member
Join Date: Apr 2015
Location: OnGameFrame()
Old 05-14-2020 , 11:06   Re: switched from team <Unassigned> to <CT>
Reply With Quote #2

Here an example to hook that:

PHP Code:
#include <sourcemod>
#include <cstrike>

public OnPluginStart( ) 
{
    
AddCommandListener(SelectTeam"jointeam");
}

public 
Action SelectTeam(int client, const char[] commandint args)
{
    
char sTeamName[8];
    
GetCmdArg(1sTeamNamesizeof(sTeamName)) ;// Get Team Name 
    
int team StringToInt(sTeamName);
    
    if (
team == CS_TEAM_SPEC// Spectator
    
{
        
//Do stuff
    
}
    else if(
team == CS_TEAM_TERRORIST//  Terrorist
    
{
        
//Do stuff
    
}
    else 
// Counter-Terrorist
    
{
        
//Do stuff
    
}
    
    return 
Plugin_Continue;

tair 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 07:05.


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