Raised This Month: $ Target: $400
 0% 

Team Freeze time


Post New Thread Reply   
 
Thread Tools Display Modes
soccdoodcss
Veteran Member
Join Date: Nov 2006
Location: Wisconsin
Old 01-02-2008 , 17:17   Re: Team Freeze time
Reply With Quote #31

Right now I'm testing: set_pev( id, pev_flags, pev( id, pev_flags ) | FL_FROZEN ); the person freezes like they should, but it seems that they can still shoot, but they do not lose ammo. Any ideas?

EDIT: I see now, it doesn't do any damage.
__________________
"Now safe beneath their wisdom and their feet.
Here I will teach you truly how to sleep."

Last edited by soccdoodcss; 01-02-2008 at 17:34.
soccdoodcss is offline
Send a message via AIM to soccdoodcss
hugz`
Veteran Member
Join Date: Jul 2007
Location: In a house
Old 01-05-2008 , 15:50   Re: Team Freeze time
Reply With Quote #32

I need to know how to disable the team freeze when there is only 1 person in the server (not in including spectators)

If there are couple spectators and only one CT and no T's then make it not work..
Thank you =p
__________________
hugz` is offline
Send a message via AIM to hugz`
slypanther
BANNED
Join Date: Jan 2008
Old 01-10-2008 , 14:36   Re: Team Freeze time
Reply With Quote #33

PHP Code:
register_event("FreezeTeam""FreezeTeam""b"
This should work
slypanther is offline
fadetodarknezz
Member
Join Date: Oct 2007
Old 01-11-2008 , 18:27   Re: Team Freeze time
Reply With Quote #34

useful... ct's cant run off during timer like i always do
fadetodarknezz is offline
bloody806
Member
Join Date: Jun 2012
Location: Czech Republic
Old 04-27-2013 , 07:14   Re: Team Freeze time
Reply With Quote #35

You can add countdown? 5..4..3..2..1..0
__________________
bloody806 is offline
Send a message via Skype™ to bloody806
petyrkpetrov
Junior Member
Join Date: Jan 2017
Old 06-09-2017 , 08:36   Re: Team Freeze time
Reply With Quote #36

Quote:
Originally Posted by M249-M4A1 View Post
This is what you want:

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""10.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)
        }
    }


This is the right code, but i found a problem, when a player joins 2-3 secs later, the freezetime didnt catch him.
__________________
petyrkpetrov is offline
Send a message via Skype™ to petyrkpetrov
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 02:12.


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