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

[CSGO] Current map in panorama hud (plugin modify)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ateszhun95
Senior Member
Join Date: Apr 2014
Location: Hungary
Old 03-24-2020 , 05:29   [CSGO] Current map in panorama hud (plugin modify)
Reply With Quote #1

Hi Guys,

Im using Fastmancz's Panorama Timeleft plugin, i need to text the current map in hud, under the timeleft text. Can somebody do this small modification please?

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.0, Timeleft, _, TIMER_REPEAT);
}

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

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

		for(int i = 1; i <= MaxClients; i++)
		{
			if(IsClientInGame(i) && !IsFakeClient(i))
			{
				char message[60];
				Format(message, sizeof(message), "Timeleft: %s", sTime);
				SetHudTextParams(-1.0, 1.00, 1.0, 25, 186, 22, 255, 0, 0.00, 0.00, 0.00);
				ShowHudText(i, -1, message);
			}
		}
	}
	return Plugin_Continue;
}
__________________
ateszhun95 is offline
iskenderkebab33
Senior Member
Join Date: Jun 2018
Old 03-25-2020 , 02:43   Re: [CSGO] Current map in panorama hud (plugin modify)
Reply With Quote #2

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);
    
char mapname[64];
    
GetCurrentMap(mapnamesizeof(mapname));
    
    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), "Timeleft: %s \n Current Map: %s"sTimemapname);
                
SetHudTextParams(-1.01.001.0251862225500.000.000.00);
                
ShowHudText(i, -1message);
            }
        }
    }
    return 
Plugin_Continue;

iskenderkebab33 is offline
ateszhun95
Senior Member
Join Date: Apr 2014
Location: Hungary
Old 03-25-2020 , 07:25   Re: [CSGO] Current map in panorama hud (plugin modify)
Reply With Quote #3

Quote:
Originally Posted by iskenderkebab33 View Post
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);
    
char mapname[64];
    
GetCurrentMap(mapnamesizeof(mapname));
    
    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), "Timeleft: %s \n Current Map: %s"sTimemapname);
                
SetHudTextParams(-1.01.001.0251862225500.000.000.00);
                
ShowHudText(i, -1message);
            }
        }
    }
    return 
Plugin_Continue;

Perfect!! Thank you so much iskenderkebab33!! <3
__________________
ateszhun95 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 14:31.


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