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

Display Date and Time plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
nark
Junior Member
Join Date: Jan 2023
Old 06-09-2023 , 09:29   Display Date and Time plugin
Reply With Quote #1

Hello,

We are using auto demo recordings and it will be nice if we cand have a plugin to display in real time (ideal on spec mode), the current date and time of the local server, so when a ban accurs, we cand easily scroll to the desired moment in the demo.

Thank you!
nark is offline
Grey83
Veteran Member
Join Date: Dec 2014
Location: Ukraine
Old 06-09-2023 , 10:21   Re: Display Date and Time plugin
Reply With Quote #2

PHP Code:
static const int R 0255127255;
static const 
float POSX = -1.0POSY 0.01TIMEOUT 0.5;

Handle
    hHUD
;
char
    sBuffer
[20];

public 
void OnPluginStart()
{
    if(!(
hHUD CreateHudSynchronizer())) SetFailState("Can't create HudSynchronizer.");
}

public 
void OnMapStart()
{
    
CreateTimer(TIMEOUTTimer_UpdateHUD_TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);
}

public 
Action Timer_UpdateHUD(Handle timer)
{
    
FormatTime(sBuffersizeof(sBuffer), "%D %T");
    
SetHudTextParams(POSXPOSYTIMEOUTRGBA_0.00.00.0);
    for(
int i 1<= MaxClientsi++) if(IsClientInGame(i) && IsClientReplay(i)) ShowSyncHudText(ihHUDsBuffer);

    return 
Plugin_Continue;

__________________

Last edited by Grey83; 06-09-2023 at 10:23.
Grey83 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 20:31.


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