Raised This Month: $ Target: $400
 0% 

set_pev ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 06-20-2007 , 11:06   Re: set_pev ?
Reply With Quote #1

Hum...i have a question! I have those functions :

Code:
public func_call(id)
{
 new parm[1]
 parm[0] = id
 
 set_task(1.0,"_health",_, parm, 1, "b")
}
 
public _health(parm[])
{
 new id = parm[0]
 
 if(!pev_valid(id))
  return 1;
 
 static health = pev(id,pev_health)
 
 if(health >= 100)
  remove_task(id)
 
 set_pev(id,pev_health, health + 2)
}
When health is > or = should remove the task,but is not removed!How i remove task in this case?
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Lee
AlliedModders Donor
Join Date: Feb 2006
Old 06-20-2007 , 14:26   Re: set_pev ?
Reply With Quote #2

Quote:
Originally Posted by Alka View Post
How i remove task in this case?
Code:
set_task(0.1, "my_func", 43770) remove_task(43770)
"ID" in this case refers to what you specified when you created the task.

Last edited by Lee; 06-20-2007 at 16:34.
Lee 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 21:32.


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