Raised This Month: $ Target: $400
 0% 

Making draining/healing loop... FINALLY fixed it, MYSELF...


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Davidos
Senior Member
Join Date: Feb 2005
Old 02-18-2007 , 15:08   Making draining/healing loop... FINALLY fixed it, MYSELF...
Reply With Quote #1

I am trying to make these lines

Code:
    new health2 = get_user_health(target)     new newhealth = health + 2     new newhealthz = health2 - 2     set_user_health(id,newhealth)     set_user_health(target,newhealthz)
loop, so that it keeps doing that till it's forced to stop

using it in this plugin


**** NOTE TO SELF ****
MSG_ONE_UNRELIABLE FOR TEH WIEN! <so THAT'S why it kept crashing... thank's rob...>

Code:
    set_user_rendering(id,kRenderFxGlowShell,255,0,0,kRenderTransAlpha,100)     set_user_rendering(target,kRenderFxGlowShell,255,0,0,kRenderTransAlpha,50)     message_begin(MSG_ONE_UNRELIABLE,get_user_msgid("ScreenFade"),{0,0,0},id);     write_short(~0);     write_short(~0);     write_short(1<<12);     write_byte(200);     write_byte(0);     write_byte(0);     write_byte(30);     message_end();     message_begin(MSG_ONE_UNRELIABLE,get_user_msgid("ScreenFade"),{0,0,0},target);     write_short(~0);     write_short(~0);     write_short(1<<12);     write_byte(200);     write_byte(0);     write_byte(0);     write_byte(30);     message_end();     set_user_maxspeed(id, 1.0)     set_user_maxspeed(target,1.0)     new health2 = get_user_health(target)     new newhealth = health + 2     new newhealthz = health2 - 2     set_user_health(id,newhealth)     set_user_health(target,newhealthz)     return PLUGIN_HANDLED

oh and, new health is already defined so you don't have to worry about that...

Anyone have an idea how to do that?

frankly it works but it only does it one time instead of keep doing it.

The plugin is being used in a command < say /drain>

Last edited by Davidos; 02-19-2007 at 09:56.
Davidos is offline
 



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 00:35.


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