Raised This Month: $ Target: $400
 0% 

freezing


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
GhostMan
Senior Member
Join Date: Jun 2012
Old 09-21-2012 , 16:32   freezing
Reply With Quote #1

In certain situacion i want to freeze every alive T or CT and after 15sec unfreeze them.

Am i doing it correctly?

Terrorist freeze/unfreeze
PHP Code:
switch(cs_get_user_team(tid))
{
    case 
CS_TEAM_T:
    {
        if(!(
pev(tidpev_flags) & FL_FROZEN))
        {
            
client_print(tidprint_center"You have been frozen for 15sec");
            
set_pev(tidpev_flags, (pev(tidpev_flags) | FL_FROZEN));
            
set_task(15.0"UnFreezeT"TASK_UNFREEZET);
        }
    }
}

public 
UnFreezeT()
{
    new 
players[32], numtid;
    
get_players(playersnum"ae""TERRORIST");
    
    for(new 
inumi++)
    {
        
tid players[i]
        
set_pev(tidpev_flags, (pev(tidpev_flags) & ~FL_FROZEN));
    }


CT freeze/unfreeze
PHP Code:
switch(cs_get_user_team(tid))
{        
    case 
CS_TEAM_CT:
    {
        if(!(
pev(tidpev_flags) & FL_FROZEN))
        {
            
client_print(tidprint_center"You have been frozen for 15sec");
            
set_pev(tidpev_flags, (pev(tidpev_flags) | FL_FROZEN));
            
set_task(15.0"UnFreezeCT"TASK_UNFREEZECT);
        }
    }
}
public 
UnFreezeCT()
{
    new 
players[32], numtid;
    
get_players(playersnum"ae""CT");
    
    for(new 
inumi++)
    {
        
tid players[i];
        
set_pev(tidpev_flags, (pev(tidpev_flags) & ~FL_FROZEN));
    }

I need all that "Swith" thing, becouse i'm doing some stuff with opposite team too.
GhostMan is offline
 


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 08:19.


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