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

[CS:GO] Panorama - Timeleft


Post New Thread Reply   
 
Thread Tools Display Modes
NanoC
Senior 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, 6 views)
__________________
My plugins
My Steam
My Discord: nano#7638
Donate via PayPal!
Total donated: $139
NanoC is offline
Send a message via Skype™ to NanoC
AlinXD
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


Thread Tools
Display Modes

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 13:33.


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