Raised This Month: $32 Target: $400
 8% 

[CS:GO] Getting team name


Post New Thread Reply   
 
Thread Tools Display Modes
exc4libur
Member
Join Date: Oct 2015
Old 03-07-2016 , 09:39   Re: [CS:GO] Getting team name
Reply With Quote #11

This is working perfect! Thanks a lot.

Best regards
exc4libur is offline
nguyenbaodanh
AlliedModders Donor
Join Date: Jun 2007
Location: HCMC, Vietnam
Old 05-10-2020 , 22:08   Re: [CS:GO] Getting team name
Reply With Quote #12

Quote:
Originally Posted by lingzhidiyu View Post
PHP Code:
public void OnPluginStart() {
    
RegConsoleCmd("sm_ptm"Command_PrintTeamName"This is a command"ADMFLAG_ROOT);
}

    
public 
Action Command_PrintTeamName(int clientint args) {
    
int teamIndex_T = -1teamIndex_CT = -1;

    
int index = -1;
    while ((
index FindEntityByClassname(index"cs_team_manager")) != -1) {
        
int teamNum GetEntProp(indexProp_Send"m_iTeamNum");
        if (
teamNum == CS_TEAM_T) {
            
teamIndex_T index;
        } else if (
teamNum == CS_TEAM_CT) {
            
teamIndex_CT index;
        }
    }

    if (
teamIndex_T == -|| teamIndex_CT == -1) {
        
PrintToChatAll("404 not found");
        return;
    }

    
char teamName_T[32];
    
GetEntPropString(teamIndex_TProp_Send"m_szClanTeamname"teamName_T32);
    
char teamName_CT[32];
    
GetEntPropString(teamIndex_CTProp_Send"m_szClanTeamname"teamName_CT32);

    
PrintToChatAll("T: %s"teamName_T);
    
PrintToChatAll("CT: %s"teamName_CT);
    
PrintToChatAll(" \x04Done");

I can't comile ... can you post .sp file pls?
__________________
nguyenbaodanh is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 05-10-2020 , 22:53   Re: [CS:GO] Getting team name
Reply With Quote #13

Add top of code

#include <sdktools>
__________________
Do not Private Message @me
Bacardi 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 12:51.


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