Raised This Month: $ Target: $400
 0% 

Heal When Not Moving?


Post New Thread Reply   
 
Thread Tools Display Modes
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 06-04-2009 , 09:45   Re: Heal When Not Moving?
Reply With Quote #11

Quote:
Originally Posted by Bugsy View Post
Quote:
Originally Posted by Sylwester View Post
... The only difference is that he checks if player has velocity instead if player origin has changed. ...
... If you didn't notice, my method checks to see if a player has velocity in any direction while yours compares previous to current origin. ...
No, I didn't notice -.-. But it has nothing to do with the main idea of this plugin which is:
PHP Code:
set_task(1.0"func"TASK_ID__"b")
...
func()
    for 
each alive player do
        if ( 
is_player_moving(player) )
            
counterplayer ] = 0
        
else
            
counterplayer ]++
            if ( 
counterplayer ] => LIMIT )
                
//counter[ player ] = 0
                //well, I didnt notice this one but still its not much different
                
healplayer 
Also is_user_alive() already checks if user is connected so you don't need to check it.

Zombie Lurker, I also asked you to tell me what did you do with my code.
If you are using it as a stand-alone plugin then there should be no problems, but if you pasted it into your zombie infection plugin, then there may be some conflicts...

EDIT:
@Bugsy: whatever.. If you can't understand what I am talking about, then there is no point in arguing with you, especially since it's a small thing...
__________________
Impossible is Nothing

Last edited by Sylwester; 06-04-2009 at 09:58.
Sylwester is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 06-04-2009 , 09:48   Re: Heal When Not Moving?
Reply With Quote #12

What has nothing to do with the main idea of this plugin? My code detects when the player has stopped moving for 3 consecutive seconds which is what he asked for.

@Sylvester: I don't mind, I just want to know what point you are trying to make. He made a simple request for code and I posted exactly what he wanted. Explain yourself and I'll shut up.
__________________

Last edited by Bugsy; 06-04-2009 at 10:00.
Bugsy is offline
Zombie Lurker
Senior Member
Join Date: Mar 2009
Old 06-04-2009 , 10:56   Re: Heal When Not Moving?
Reply With Quote #13

I'm sticking with Bugsy's code because its more simple and easier to work with. Also, it doesnt conflict with my other codes. Sylwester, if you could proove yours to be better then I'll use yours. And you both dont really need to argue about this because its just a small request.
__________________
Zombie Lurker is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 06-04-2009 , 11:03   Re: Heal When Not Moving?
Reply With Quote #14

I wasn't trying to argue with him, I just wanted him to explain the point he was trying to make. I'm pretty sure he is just confused about what my code does.

Zombie, I updated the above code earlier today so just check to see you have the revised code.
__________________
Bugsy is offline
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 06-04-2009 , 12:05   Re: Heal When Not Moving?
Reply With Quote #15

Confused about that little piece of code? me? haha, nice joke...

Zombie Lurker, whether you use his or mine it doesn't matter since both work in very similar way.
__________________
Impossible is Nothing
Sylwester is offline
Zombie Lurker
Senior Member
Join Date: Mar 2009
Old 06-04-2009 , 20:44   Re: Heal When Not Moving?
Reply With Quote #16

Sure... whatever you say...
__________________
Zombie Lurker 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 14:01.


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