[Req] Admin kill bonus
Hey, i need a plugin which give admins with those flags a bonus per kill.
Flags and bonus per kill : "abcdefghijkmnopqrsu" ========= "100 HP + 100 AP + 10000$ per kill" "bcdefimjpt" ================ "80 HP + 80 AP + 8000$ per kill" "bcdefimjpr" ================ "70 HP + 70 AP + 7000$ per kill" "bcdefimjpo" ================ "60 HP + 60 AP + 6000$ per kill" "bcdefimnjp" ================ "25 HP + 25 AP + 1200$ per kill" "bcdefimnj" ================= "40 HP + 40 AP + 4000$ per kill" "bceinj" =================== "40 HP + 40 AP + 4000$ per kill" "bn" ===================== "40 HP + 40 AP + 4000$ per kill" thanks in advance :) |
Re: [Req] Admin kill bonus
PHP Code:
|
Re: [Req] Admin kill bonus
I tested it and the money works fine as it should. I think the clamp() needs to get modified. The players health & armor gets set to 100 but doesn't get added to it's current health & armor.
EDIT: Removing the clamp() function could fix this issue. Also bugsy, could you make this so that the bonuses only apply if the flags are equal? right now if u add a flag like "x", you still get that 10k money bonus. |
Re: [Req] Admin kill bonus
Quote:
|
Re: [Req] Admin kill bonus
I think clamp() is doing what it should. This limits the value to between 0 and 100, which is the max capacity of health and armor. If you look at the code, it does take their current money/health/armor and add on to it the bonus value.
Regarding flag handling, this will award the bonus if the player has all of the flags for the specific bonus level. If they have additional flags beyond the bonus flags, they get the bonus. So what you are saying is they should only get the bonus if they have ONLY the flags for the bonus, and no other flags? |
Re: [Req] Admin kill bonus
Quote:
|
Re: [Req] Admin kill bonus
So you want to allow health and armor over 100?
|
Re: [Req] Admin kill bonus
Quote:
|
Re: [Req] Admin kill bonus
Above code updated to address admin flags and clamp removed.
|
Re: [Req] Admin kill bonus
thanks for your help, i tested it and it's working good.
|
All times are GMT -4. The time now is 05:05. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.