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(id, Float:time)
{
if(cs_get_user_team(id) == CS_TEAM_T)
set_pev(id, pev_flags, (pev(id, pev_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(id, pev_flags, (pev(id, pev_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(id, pev_flags) == pev(id, pev_flags) & FL_FROZEN)
[...]
__________________