Heal When Not Moving?
I'd like someone to give me an example of how to make all players heal when not moving for three seconds. I have tried it myself but my horrible job makes my game have insane lag and crash. Here's my code :
PHP Code:
|
Re: Heal When Not Moving?
try Ham_IsMoving
PHP Code:
|
Re: Heal When Not Moving?
not tested
PHP Code:
|
Re: Heal When Not Moving?
Well, I cant edit it to work properly. You see, I'm using it for a zombie infection plugin. And it makes the plugin stop working. (The zombie doesnt appear and other stuff) Could you try and give me a different one? Or is this the only one? T.T I hope there is more than 1.
|
Re: Heal When Not Moving?
PHP Code:
|
Re: Heal When Not Moving?
Thanks for your idea bugsy but I'm gonna test it tomorrow.
|
Re: Heal When Not Moving?
idea? It's exactly the same as in my code. The only difference is that he checks if player has velocity instead if player origin has changed. He also forgot to check if user is alive.
I don't know how it is possible for my code to make some other plugin stop to work. If you want help then post link to code of your zombie infection plugin and tell me what did you do with my code. |
Re: Heal When Not Moving?
Acctually, I'm not making public my zombie infection thingy because to me, its horrible so you know. And I'll try to work around with your code. Seems to be better.
|
Re: Heal When Not Moving?
Quote:
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. How is my method exactly the same as yours? Zombie Lurker, I added an is_user_alive() check to the above code post. If you have any issues with getting it to work let me know and I can adjust it to accommodate your particular need. |
Re: Heal When Not Moving?
Ok bugsy. Still trying to test with bots. (A little complicated lol)
|
| All times are GMT -4. The time now is 14:01. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.