[Include] [INC] Two useful functions
#1

Hey, I don't know if this has already been made by someone else, but this is my version of:
two Functions:
GivePlayerHealth
RemovePlayerHealth

Syntax:
GivePlayerHealth(playerid, amount);
RemovePlayerHealth(playerid, amount);
(Note: do not put a subtraction sign before the amount, that will add money, since it already minuses health)

EXAMPLES:
GivePlayerHealth(playerid, 100);
RemovePlayerHealth(playerid, 20);


BUG PREVENTION
With GivePlayerHealth, if you go over 100, it will automatically adjust it to 100.
With RemovePlayerHealth, if you go below 0, it will also automatically adjust it to 0.


It's two basic STOCKs, I also made it so it prevents bugs, paste this anywhere in your script, just not under a public.

Downloads
If you want to insert into your script:
Paste Bin
Include

Any criticism is welcome as long as it is it is not inappropriate or a comment saying "What a waste of space" I made it for fun, and now I'm releasing it.
Any Problems, please post the problems!

Regards
Paladin
Reply
#2

This isn't reall an include ..

And if you go with health under 0 player dies anyway.
Reply
#3

Quote:
Originally Posted by $ЂЯĢ
This isn't reall an include ..

And if you go with health under 0 player dies anyway.
Then remove it, or don't download it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)