Raised This Month: $ Target: $400
 0% 

How to show hud to individual players


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
SID12
Junior Member
Join Date: May 2019
Old 08-20-2019 , 13:33   Re: How to show hud to individual players
Reply With Quote #5

Quote:
Originally Posted by edon1337 View Post
Post in Suggestion/Request section if you're a beginner. Scripting help section is intended for people who at least have basic knowledge in scripting.
I don't know why you're setting a task, but here you go.
PHP Code:
#include < amxmodx >

enum ( += 1234 )
{
    
TASK_TIME,
    
TASK_TIMELEFT
}

public 
plugin_init( ) 
{
    
register_clcmd"say /thetime""The_time" );
    
register_clcmd"say_team /thetime""The_time" );
    
    
register_clcmd"say /timeleft""Timeleft" );
    
register_clcmd"say_team /timeleft""Timeleft" );
}

public 
The_timeid )
{
    if( 
task_existsid TASK_TIME ) )
    {
        
remove_taskTASK_TIME );
    }

    
set_task1.0"TaskTime", ( id TASK_TIME ) );
}

public 
Timeleftid )
{
    if( 
task_existsid TASK_TIMELEFT ) )
    {
        
remove_taskTASK_TIMELEFT );
    }

    
set_task1.0"TaskTimeLeft", ( id TASK_TIMELEFT ) );
}

public 
TaskTimeid )
{
    
id -= TASK_TIME;

    static 
szTime32 ];
    
get_time"%H:%M:%S"szTimecharsmaxszTime ) ); 
    
    
set_hudmessage255000.950.0100.10.90.10.1, -);
    
show_hudmessageid"Time: %s"szTime );
}

public 
TaskTimeLeftid )
{
    
id -= TASK_TIMELEFT;

    static 
iTimeleft;
    
iTimeleft get_timeleft( );
    
    
set_hudmessage255000.950.0300.10.90.10.1, -);
    
show_hudmessageid"Timeleft: %d:%02d", ( iTimeleft 60 ), ( iTimeleft 60 ) );


Lol I'm not a beginner it wasn't about this plugin specifically this was a example I'm using it for something else thx though
SID12 is offline
 



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 17:30.


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