Raised This Month: $ Target: $400
 0% 

Hp restore bug :(


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
edga85
BANNED
Join Date: Jan 2009
Old 10-14-2009 , 14:40   Hp restore bug :(
Reply With Quote #1

Again bug....
Code:
case 0:
{
if (iTeam == CS_TEAM_T)
{
if(is_user_alive(id))
{
new hp = get_user_health(id);
 
if(hp < 3500)
{
set_task(1.0,"gydytojas", id)
}
}
}
Code:
public gydytojas(id) {
 
new hp = get_user_health(id);
 
if(hp < 3500)
{
set_user_health(id, hp + 5);
set_task(1.0,"gydytojas", id);
}
else
{
client_print(id, print_chat, "Daugiau HP nebegausi :)", hp)
return PLUGIN_HANDLED;
}
 
return PLUGIN_CONTINUE;
}
when round ends and begins new its still restoring hp.....
edga85 is offline
Send a message via Skype™ to edga85
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 10-14-2009 , 14:49   Re: Hp restore bug :(
Reply With Quote #2

Code:
new g_iMaxPlayers; public plugin_init( ) {     register_logevent( "EventRoundEnd", 2, "1=Round_End" );     g_iMaxPlayers = get_maxplayers( ); } public EventRoundEnd( ) {     for( new i = 1; i <= g_iMaxPlayers; i++ ) {         remove_task( i );     } }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Reply


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 22:41.


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