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

[CS:GO] Panorama - Timeleft


Post New Thread Reply   
 
Thread Tools Display Modes
NanoC
Veteran Member
Join Date: Jan 2016
Location: Argentina
Old 05-16-2019 , 14:57   Re: [CS:GO] Panorama - Timeleft
Reply With Quote #11

Quote:
Originally Posted by AlinXD View Post
How can I add something to the message? I want to add my server's name to it.
Example: OGX - Timeleft: 10: 31
PHP Code:
#include <sourcemod>

public Plugin myinfo 
{
    
name "Panorama - Timeleft",
    
author "Fastmancz",
    
description "Shows timeleft at the bottom of the screen",
    
version "1.0.1"
};

public 
void OnPluginStart()
{
    
CreateTimer(1.0Timeleft_TIMER_REPEAT);
}

public 
Action Timeleft(Handle timer)
{
    
char sTime[60];
    
int iTimeleft;

    
GetMapTimeLeft(iTimeleft);
    if(
iTimeleft 0)
    {
        
FormatTime(sTimesizeof(sTime), "%M:%S"iTimeleft);

        for(
int i 1<= MaxClientsi++)
        {
            if(
IsClientInGame(i) && !IsFakeClient(i))
            {
                
char message[60];
                
Format(messagesizeof(message), "OGX - Timeleft: %s"sTime);
                
SetHudTextParams(-1.01.001.0418025525500.000.000.00);
                
ShowHudText(i, -1message);
            }
        }
    }
    return 
Plugin_Continue;


Compiled plugin:
Attached Files
File Type: smx panorama_timeleft.smx (4.2 KB, 175 views)
__________________
NanoC is offline
Send a message via Skype™ to NanoC
AlinXD
Senior Member
Join Date: Feb 2016
Old 05-16-2019 , 15:42   Re: [CS:GO] Panorama - Timeleft
Reply With Quote #12

Thank you!
__________________
AlinXD 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:46.


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