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

Question about mp_freezetime


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
RelaxMazteR
Member
Join Date: Jul 2009
Location: Sweden
Old 02-08-2011 , 13:02   Question about mp_freezetime
Reply With Quote #1

Is it possible to do so only one team will be freezed? (When I use mp_freezetime)
RelaxMazteR is offline
ImXinR
Member
Join Date: Dec 2010
Old 02-09-2011 , 02:52   Re: Question about mp_freezetime
Reply With Quote #2

The thread which is regarding to this has been made b4 . Search google But anyway ,
Here ,
PHP Code:
#include <amxmodx> 
#include <amxmisc> 
#include <fakemeta> 

#define PLUGIN "Team Freeze" 
#define VERSION "1.0" 
#define AUTHOR "M249-M4A1" 
// alka is teh sexy man 

new gTeamFreezegFreezeTimegFreezeTeam 

public plugin_init() { 
    
register_plugin(PLUGINVERSIONAUTHOR
    
register_event("HLTV""eRoundStart""a""1=0""2=0"
     
    
// Change the CVAR "freeze_team" to "0" to disable this plugin 
    
gTeamFreeze register_cvar("freeze_team_enabled""1"
    
// 10.0 is how many seconds to freeze the player 
    
gFreezeTime register_cvar("freeze_time""3.0"
    
// team 1 = terrorist, team 2 = counter-terrorist 
    
gFreezeTeam register_cvar("freeze_team""1"


public 
eRoundStart() { 
    
// This set_task is necessary 
    
if (get_pcvar_num(gTeamFreeze) > 0) { 
        
set_task(get_cvar_num("mp_freezetime") + 0.1"FreezeTeam"
    } 


public 
FreezeTeam() { 
    new 
players[32], totalplayersplayer 
    get_players
(playerstotalplayers
     
    for (new 
0totalplayersi++) 
    { 
        
player players[i
        if (
get_user_team(player) == get_pcvar_num(gFreezeTeam)) { 
            
client_print(playerprint_chat"[AMXX] Your team is currently frozen for %i seconds."get_pcvar_num(gFreezeTime)) 
            
set_pev(playerpev_flagspev(playerpev_flags) | FL_FROZEN
        } 
    } 
    
set_task(float(get_pcvar_num(gFreezeTime)), "UnFreezeTeam"6291


public 
UnFreezeTeam() { 
    new 
players[32], totalplayersplayer 
    get_players
(playerstotalplayers
     
    for (new 
0totalplayersi++) 
    { 
        
player players[i
        if (
get_user_team(player) == get_pcvar_num(gFreezeTeam)) { 
            
client_print(playerprint_chat"[AMXX] Your team is no longer frozen."
            
set_pev(playerpev_flagspev(playerpev_flags) & ~FL_FROZEN
        } 
    } 

Quote:
// 10.0 is how many seconds to freeze the player
gFreezeTime = register_cvar("freeze_time", "3.0")
// team 1 = terrorist, team 2 = counter-terrorist
gFreezeTeam = register_cvar("freeze_team", "1")
Change the freeze_time to the time you want the time to freeze. 1/2 for CT/T . Default T. Found @ Team Freeze Time
__________________
Sometimes , Life Sucks .. Don't You Agree? But ,
Listening To Music Make Us Feel Better
ImXinR is offline
RelaxMazteR
Member
Join Date: Jul 2009
Location: Sweden
Old 02-09-2011 , 08:55   Re: Question about mp_freezetime
Reply With Quote #3

I think you misunderstood me, I want to have the same function as mp_roundtime, (inclusive clock), but only for one team. This creates a "new" freeze time? I have not had time to test it
RelaxMazteR is offline
nnajko
Senior Member
Join Date: May 2009
Location: Sweden
Old 02-09-2011 , 10:33   Re: Question about mp_freezetime
Reply With Quote #4

Try this one.
Im sure there is better ways doing this though.
Attached Files
File Type: sma Get Plugin or Get Source (Freezetime.sma - 652 views - 1.8 KB)
nnajko is offline
RelaxMazteR
Member
Join Date: Jul 2009
Location: Sweden
Old 02-09-2011 , 16:24   Re: Question about mp_freezetime
Reply With Quote #5

Thanks it works!

Last edited by RelaxMazteR; 04-11-2011 at 15:58. Reason: warnings
RelaxMazteR is offline
RelaxMazteR
Member
Join Date: Jul 2009
Location: Sweden
Old 04-11-2011 , 15:58   Re: Question about mp_freezetime
Reply With Quote #6

I'm getting some warnings:
[AMXX] Run time error 10: native error (native "set_user_maxspeed")
[AMXX] [0] freezetime.sma::reset_user_maxspeed (line 80)
[AMXX] [1] freezetime.sma::taskResetSpeed (line 61)
RelaxMazteR 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 04:36.


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