Raised This Month: $ Target: $400
 0% 

Freezetime HUD message


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
bloody806
Member
Join Date: Jun 2012
Location: Czech Republic
Old 02-05-2013 , 03:34   Freezetime HUD message
Reply With Quote #1

Hi i have this plugin... And I need to add a HUD message for all to see "CT have lead xx seconds"
xx - mp_freezetime cvar
Help me pls

PHP Code:
#include <amxmodx>
#include <fakemeta>

new bool:g_bFreezeTime

public plugin_init()
{
    
register_plugin("Only T Freezetime""0.1""ConnorMcLeod")
    
register_event("HLTV""eNewRound""a""1=0""2=0")
    
register_logevent("eRoundStart"2"1=Round_Start")
    
register_event("CurWeapon""eCurWeapon""be""1!0")
}

public 
eNewRound()
{
    
g_bFreezeTime true
}

public 
eRoundStart()
{
    
g_bFreezeTime false
}

public 
eCurWeapon(id)
{
    if(!
g_bFreezeTime)
        return

    if(
get_user_team(id) != 2)
        return

    
cs_reset_user_maxspeed(id)
}

cs_reset_user_maxspeed(id)
{
    new 
Float:maxspeed;
    switch ( 
get_user_weapon(id) )
    {
        case 
CSW_SG550,
            
CSW_AWP,
            
CSW_G3SG1:
            
maxspeed 210.0;
        case 
CSW_M249:
            
maxspeed 220.0;
        case 
CSW_AK47:
            
maxspeed 221.0;
        case 
CSW_M3,
            
CSW_M4A1:
            
maxspeed 230.0;
        case 
CSW_SG552:
            
maxspeed 235.0;
        case 
CSW_XM1014,
            
CSW_AUG,
            
CSW_GALIL,
            
CSW_FAMAS:
            
maxspeed 240.0;
        case 
CSW_P90:
            
maxspeed 245.0;
        case 
CSW_SCOUT:
            
maxspeed 260.0;
        default:
            
maxspeed 250.0;
    }
    
engfunc(EngFunc_SetClientMaxspeedidmaxspeed);
    
set_pev(idpev_maxspeedmaxspeed);


Last edited by bloody806; 02-05-2013 at 03:39.
bloody806 is offline
Send a message via Skype™ to bloody806
 


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 20:39.


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