Raised This Month: $ Target: $400
 0% 

Timeleft instead of Round timer


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
st0kata
Member
Join Date: Aug 2007
Old 12-24-2007 , 15:34   Timeleft instead of Round timer
Reply With Quote #1

Hi guys,
I couldn't figure out how to display map timeleft instead of the round time. Can anyone help me ? :/
st0kata is offline
travo
Senior Member
Join Date: Aug 2006
Old 12-25-2007 , 14:21   Re: Timeleft instead of Round timer
Reply With Quote #2

I think this is what your wanting

PHP Code:
#include <amxmodx>

#define PLUGIN "Timeleft Hud"
#define VERSION "1.0"
#define AUTHOR "WhooKid"

new Toggle,FreezeTime,ShowTimer,RoundTime,Scenario;

public 
plugin_init() 
{
    
register_plugin(PLUGIN,VERSION,AUTHOR);
    
register_cvar(PLUGIN,VERSION,FCVAR_SPONLY|FCVAR_SERVER);
    
    
register_event("ResetHUD","player_resethud","b");

    
Toggle register_cvar("amx_timelefthud","1");
    
FreezeTime get_cvar_num("mp_freezetime");
    
ShowTimer get_user_msgid("ShowTimer");
    
RoundTime get_user_msgid("RoundTime");
    
Scenario get_user_msgid("Scenario");
}

public 
player_resethud(id)
{
    if (
get_pcvar_num(Toggle))
        
set_task(float(FreezeTime),"player_timeleft",id);
}

public 
player_timeleft(id)
{
    new 
timeleft get_timeleft();
    if (
is_user_connected(id) && timeleft<9999 && timeleft>0)
    {
        
message_begin(MSG_ONE_UNRELIABLE,ShowTimer,_,id);
        
message_end();
    
        
message_begin(MSG_ONE_UNRELIABLE,RoundTime,_,id);
        
write_short(timeleft);
        
message_end();
    
        
message_begin(MSG_ONE_UNRELIABLE,Scenario,_,id);
        
write_byte(1);
        
write_string("minus");
        
write_byte(150);
        
write_short(0);
        
message_end();
    }


Last edited by travo; 12-25-2007 at 14:23. Reason: change
travo is offline
st0kata
Member
Join Date: Aug 2007
Old 12-25-2007 , 14:48   Re: Timeleft instead of Round timer
Reply With Quote #3

thank you travo that's it
st0kata is offline
Pokemon
Senior Member
Join Date: Mar 2008
Old 03-30-2008 , 13:39   Re: Timeleft instead of Round timer
Reply With Quote #4

Creo que es el plugin que ando buscando (sorry my spanish)
Pokemon 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 11:12.


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