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

no need for this


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
AlexFlaviu
Junior Member
Join Date: Aug 2018
Old 06-03-2019 , 12:35   no need for this
Reply With Quote #1

no need for this

Last edited by AlexFlaviu; 09-12-2023 at 01:22. Reason: no need for this
AlexFlaviu is offline
farawayf
Senior Member
Join Date: Jan 2019
Old 06-04-2019 , 08:00   Re: Teams Alive Players show in HUD for CSS
Reply With Quote #2

PHP Code:
#pragma semicolon 1

#include <sourcemod>
#include <sdktools>

#pragma newdecls required

Handle timer1;
Handle hsync;

public 
void OnPluginStart() {
    
HookEvent("round_start"RoundStart);
    
hsync CreateHudSynchronizer();
}    

public 
Action RoundStart(Event event, const char[] namebool dontBroadcast) {
    
delete timer1;
    
timer1 CreateTimer(1.0, print, _TIMER_REPEAT TIMER_FLAG_NO_MAPCHANGE);
}

public 
Action print(Handle timer) {
    
int ACT GetAPCTCount();
    
int AT GetAPTCount();
    
char printc[70];
    
    
Format(printcsizeof(printc), "%i Terrorists vs %i Counter-Terrorists"ATACT);
    
    for(
int i MaxClientsi++) {
        if(
IsClientInGame(i)) {
            
SetHudTextParams(-1.00.2501.01732554725500.00.20.3);
            
ShowSyncHudText(ihsyncprintc);
        }    
    }
}

stock int GetAPCTCount() { 
    
int ctcounts 0
    
    for (
int i 1<= MaxClientsi++) { 
        if (
IsClientInGame(i) && IsPlayerAlive(i) && GetClientTeam(i) == 3)  
            
ctcounts++; 
    }
    return 
ctcounts
}

stock int GetAPTCount() { 
    
int tcounts 0;
    
    for (
int i 1<= MaxClientsi++) { 
        if (
IsClientInGame(i) && IsPlayerAlive(i) && GetClientTeam(i) == 2)  
            
tcounts++; 
    }
    return 
tcounts


Last edited by farawayf; 06-04-2019 at 12:27.
farawayf is offline
Batfoxkid
Senior Member
Join Date: Nov 2018
Location: ''On the map''
Old 06-04-2019 , 10:41   Re: solved
Reply With Quote #3

Don't blank out the thread, leave the problem there for others to see.
__________________
Batfoxkid 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 07:26.


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