Raised This Month: $ Target: $400
 0% 

freezing


Post New Thread Reply   
 
Thread Tools Display Modes
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
Swaycher
Senior Member
Join Date: Feb 2009
Location: Arg/MyHome/PawnStudio
Old 09-21-2012 , 22:49   Re: freezing
Reply With Quote #2

PHP Code:
set_task(15.0"UnFreezeCT"TASK_UNFREEZECT); 
to:

PHP Code:
set_task(15.0"UnFreezeCT"tid+TASK_UNFREEZECT); 
__________________
Quote:
Originally Posted by fearAR View Post
Claro esta que no tengo idea de como verificar los diferentes cortes de ángulo.
http://forums.alliedmods.net/showthread.php?t=196349
Swaycher is offline
Send a message via MSN to Swaycher Send a message via Skype™ to Swaycher
GhostMan
Senior Member
Join Date: Jun 2012
Old 09-22-2012 , 06:02   Re: freezing
Reply With Quote #3

Can you explain me what's the difference?
GhostMan is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-22-2012 , 13:37   Re: freezing
Reply With Quote #4

Before asking if you are doing it correctly, you should test it. If it doesn't work then you have your answer. Test it. If it doesn't work, post the WHOLE code as an attachment.

Quote:
Originally Posted by GhostMan View Post
Can you explain me what's the difference?
It doesn't do anything.
__________________

Last edited by fysiks; 09-22-2012 at 13:39.
fysiks 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 08:19.


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