Raised This Month: $ Target: $400
 0% 

freeze


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ARES[ro]
Senior Member
Join Date: Apr 2010
Old 06-16-2011 , 16:22   Re: freeze
Reply With Quote #1

PHP Code:
// no need for the bool with my example that was based on your code ... new bool:kazkas ... to use bool dont even use tasks, only forwards
#define TASK_kazkas 1000

[...]

public 
set_kazkas(idFloat:time)
{
    if(
cs_get_user_team(id) == CS_TEAM_T)
        
set_pev(idpev_flags, (pev(idpev_flags) | FL_FROZEN))  
    if(!
task_exists(TASK_kazkas id))
        
remove_task(TASK_kazkas id)
    
set_task(time"func_task_kazkas"TASK_kazkas id)
}

public 
func_task_kazkas(taskid)
{
    new 
id taskid TASK_kazkas1
    set_pev
(idpev_flags, (pev(idpev_flags) ^ FL_FROZEN))
    
// ^ is exclusive or, and its used in assembly to clear out a number of bits and making them 0 no matter what their value is

PHP Code:
//To verify if player is frozen just do this:
if(pev(idpev_flags) == pev(idpev_flags) & FL_FROZEN)
    [...] 
__________________
okay

Last edited by ARES[ro]; 06-16-2011 at 16:34.
ARES[ro] 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 23:32.


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