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

[csgo] m_flProgressBarStartTime


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
vardof
New Member
Join Date: Jun 2017
Old 05-18-2019 , 10:35   [csgo] m_flProgressBarStartTime
Reply With Quote #1

Have a plugin that used the code below without issue to created a progress bar:

PHP Code:
SetEntPropFloat(clientProp_Send"m_flProgressBarStartTime"GetGameTime());
SetEntProp(clientProp_Send"m_iProgressBarDuration"takeTime); 
At some point it stopped working, has there ever been an alternative way to create the same bar or a plugin that I can look at that creates something similar?
vardof is offline
CrazyHackGUT
AlliedModders Donor
Join Date: Feb 2016
Location: Izhevsk, Russia
Old 05-18-2019 , 16:01   Re: [csgo] m_flProgressBarStartTime
Reply With Quote #2

komashchenko already pointed this "feature" on another forum for RU users.
Now, for creating progress bar, you need use SDKCall() and function CCSPlayer::SetProgressBarTime(). Example you can found here.
__________________
My english is very bad. I am live in Russia. Learning english language - very hard task for me...

Last edited by CrazyHackGUT; 05-18-2019 at 16:03.
CrazyHackGUT is offline
Send a message via ICQ to CrazyHackGUT Send a message via Skype™ to CrazyHackGUT
quasemago
Senior Member
Join Date: Dec 2018
Location: Brazil
Old 05-18-2019 , 18:26   Re: [csgo] m_flProgressBarStartTime
Reply With Quote #3

As the CrazyHackGUT said.

Gamedata:
PHP Code:
"Games"
{
    
"csgo"
    
{
        
"Signatures"
        
{
            
"CCSPlayer::SetProgressBarTime"
            
{
                
"library"    "server"
                "windows"    "\x55\x8B\xEC\x51\x53\x8B\xD9\x56\x57\x8B\x7D\x08\x39\xBB\xD0\x27\x00\x00"
                "linux"        "\x55\x89\xE5\x83\xEC\x48\x89\x5D\xF4\x8B\x5D\x08\x89\x75\xF8\x8B\x75\x0C\x89\x7D\xFC\x39\xB3\xE8\x27\x00\x00"
            
}
        }
    }

Example Code:
PHP Code:
#include <sourcemod>
#include <sdktools>

#pragma semicolon 1
#pragma newdecls required

Handle g_hSetProgressBarTime null;

public 
void OnPluginStart()
{
    
Handle hGameConf LoadGameConfigFile("progressbar.games");

    if (
hGameConf == null)
    {
        
SetFailState("Game config was not loaded right.");
        return;
    }

    
// Starts the preparation of an SDK call
    
StartPrepSDKCall(SDKCall_Player);
    
PrepSDKCall_SetFromConf(hGameConfSDKConf_Signature"CCSPlayer::SetProgressBarTime");
    
PrepSDKCall_AddParameter(SDKType_PlainOldDataSDKPass_Plain);

    if (!(
g_hSetProgressBarTime EndPrepSDKCall()))
    {
        
SetFailState("Failed to find \"CCSPlayer::SetProgressBarTime\".");
        return;
    }

    
// Clear memory.
    
delete hGameConf;

    
// Test CMD.
    
RegConsoleCmd("sm_testbar"Command_TestBar);
}

public 
Action Command_TestBar(int clientint args)
{
    if (
args 1)
    {
        
ReplyToCommand(client"[SM] Usage: sm_testbar <time>");
        return 
Plugin_Handled;
    }
    
    
char arg1[16];
    
GetCmdArg(1arg1sizeof(arg1));

    
int time StringToInt(arg1);
    if (
time 0) {
        
time 0;
    }

    
SDKCall(g_hSetProgressBarTimeclienttime);

    
ReplyToCommand(client"[SM] Bar changed to \x04%i"time);
    return 
Plugin_Handled;

Set the time to 0 after the count is finished for close progress bar.
__________________
I accept requests for plugins and configuration of servers.


If you liked my work, consider making a donation via PayPal.

Last edited by quasemago; 05-19-2019 at 05:20.
quasemago is offline
SHUFEN
Senior Member
Join Date: Jun 2014
Location: Japan, Tokyo
Old 05-19-2019 , 04:23   Re: [csgo] m_flProgressBarStartTime
Reply With Quote #4

Seems working fine.
Btw can we add custom text on progress bar hud?
Or is it hard-coded within client side?

Last edited by SHUFEN; 05-19-2019 at 04:44.
SHUFEN is offline
Send a message via Skype™ to SHUFEN
CrazyHackGUT
AlliedModders Donor
Join Date: Feb 2016
Location: Izhevsk, Russia
Old 05-19-2019 , 11:49   Re: [csgo] m_flProgressBarStartTime
Reply With Quote #5

Looks like hardcoded. I can't say with 100% guarantee. I work only with TF2, not CSGO. But read all threads.
__________________
My english is very bad. I am live in Russia. Learning english language - very hard task for me...
CrazyHackGUT is offline
Send a message via ICQ to CrazyHackGUT Send a message via Skype™ to CrazyHackGUT
ttasdasda
Member
Join Date: Apr 2014
Old 11-20-2019 , 03:13   Re: [csgo] m_flProgressBarStartTime
Reply With Quote #6

Could someone please update the sig?
ttasdasda is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 11-20-2019 , 04:38   Re: [csgo] m_flProgressBarStartTime
Reply With Quote #7

saw it in discord
this is for linux
try
Code:
\x55\x89\xE5\x83\xEC\x48\x89\x5D\xF4\x8B\x5D\x08\x89\x75\xF8\x8B\x75\x0C\x89\x7D\xFC\x39\xB3\x00\x28\x00\x00
__________________
8guawong 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 11:59.


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