Healing Regen
How would I be able to do either one of these:
A) Make it so people gradually recieve 50 hp in the space of 10 seconds. B) Make it so health is added ontop of users health instead of setting there health? |
set a task every second to give 1 hp (which you'll want to keep track of using the damage event, because you cant add hit points, you have to keep track of what he has as a variable and add one to that, ande then set his health to that variable). You'll also want to keep track of how much hp you've given someone with another variable and most likely start it at 50 and count down. You can simply use arrays such as:
new healthgive[33] new currenthealth[33] and set healthgive[player id] to 50 whenever you want to give them health. Then using the register event command (which i dont feel like looking up its real name right now) you can find out how much health they have. (the event "Health" will tell you what their current health is, as the first byte it sends is the value.) this will probably blow your mind if your not already familiar with scripting though. You should look through the amxmodx.inc file (in scripting/include) to see some functions that might be handy |
Re: Healing Regen
Quote:
Code:
That when executed will give all players an extra 50hp within a 10 second time frame. |
Very nice. You rock lol. :)
|
I was messing with it a little and fixed some errors for you , but I didn't add the comments , here it is. :
Code:
|
hmm remmeber the RedCross plugin I was working on.. hmm who was it peli? or 2|ob.. wonder who I uploaded it to.. well you can use some thing like that.. its on my server you can see it there or IM me.
|
It was me. :) Yea you can look at that as help , it's a good source. :)
|
There wern't any errors you only removed the semi-colons...
Sorry about those its just habbit from C++. |
No problem , but when I ran the compiler it came with some errors...
|
I just want to change this around a bit , but one question.
1. How do you make it so you can only regenerate at certain areas in a map? Thanks. :) |
| All times are GMT -4. The time now is 14:52. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.