Raised This Month: $51 Target: $400
 12% 

[Request] Plugin who gives some bonuses


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
tre3fla
Member
Join Date: Jul 2012
Old 10-07-2012 , 16:51   [Request] Plugin who gives some bonuses
Reply With Quote #1

I don't know if it exists, but i need a plugin who gives at every new round start to a random player from Ct team the following :
+150HP
+300 Armor
600 speed
300 gravity
Light Blue glow

And, if you can, add a informative message who shows to everyone the name of the CT who was chosen to get the bonuses and what bonuses he got
P.S : Message must appear in chat and be colored

Example of message : tre3fla received +150 HP, +300 Armor, 600 speed and 300 gravity.

Thank you,hopu you understand what i'm try to say.
tre3fla is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 10-07-2012 , 18:44   Re: [Request] Plugin who gives some bonuses
Reply With Quote #2

Do you want to be able to set a minimum number of cts/server players?

-I'm writing the plugin now-
__________________
What an elegant solution to a problem that doesn't need solving....

Last edited by Liverwiz; 10-07-2012 at 18:45.
Liverwiz is offline
tre3fla
Member
Join Date: Jul 2012
Old 10-07-2012 , 19:46   Re: [Request] Plugin who gives some bonuses
Reply With Quote #3

How you think is well.

Thank you for your help.

Last edited by tre3fla; 10-07-2012 at 19:47.
tre3fla is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 10-07-2012 , 20:38   Re: [Request] Plugin who gives some bonuses
Reply With Quote #4

Here you go. Let me know if there are any bugs. I did not test it.

#define MIN_CT_PLAYERS 2 // This is the minimum amount of eligible CT players to set bonus
#define MIN_SERVER_PLAYERS 4 // This is the minimum amount of players to set bonus
  • All bonus powers are easily set in the defines. Floats must remain floats (keep the x.0)
  • Glow color can be changed in the Glow array. {R, G, B} values
  • IncludeBots is set to true. Set this to faflse if you don't want bots to have bonus powers (this will also be included in eligible players)
  • You can change the message by editing szMessage variable and the color by the 2nd char in that string. e.g. ^4 for green (default) ^1 for orange ^3 for team color
  • ct_bonus 0 in amxx.cfg to disable the plugin. (its a CVAR)

There is no special instillation. Just put liver_ctBonus.amxx in plugins.ini and make sure fun module is enabled. even the CVAR isn't needed unless you want to disable the plugin.

NOTE: if you have 2 players on CT and one of them dies before freeze time is over; powers will not be set. (that's just the way the code is written)

Feedback on functionality and code is always welcome!
Attached Files
File Type: sma Get Plugin or Get Source (liver_ctBonus.sma - 607 views - 2.8 KB)
__________________
What an elegant solution to a problem that doesn't need solving....

Last edited by Liverwiz; 10-07-2012 at 20:42.
Liverwiz is offline
tre3fla
Member
Join Date: Jul 2012
Old 10-08-2012 , 04:59   Re: [Request] Plugin who gives some bonuses
Reply With Quote #5

Thank you verry much. I will post if is any problems with this plugin.

EDIT : I have only one question... If the player who was chosen to get the powers not dies in next round he will still have the powers?

Last edited by tre3fla; 10-08-2012 at 06:01.
tre3fla is offline
guipatinador
SourceMod Donner Party
Join Date: Oct 2009
Location: Poortugal
Old 10-08-2012 , 06:24   Re: [Request] Plugin who gives some bonuses
Reply With Quote #6

Quote:
Originally Posted by tre3fla View Post
EDIT : I have only one question... If the player who was chosen to get the powers not dies in next round he will still have the powers?
No. The power goes to another player (or the same player, but the probability is small).
guipatinador is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 10-08-2012 , 08:18   Re: [Request] Plugin who gives some bonuses
Reply With Quote #7

Quote:
Originally Posted by tre3fla View Post
Thank you verry much. I will post if is any problems with this plugin.

EDIT : I have only one question... If the player who was chosen to get the powers not dies in next round he will still have the powers?
Quote:
Originally Posted by guipatinador View Post
No. The power goes to another player (or the same player, but the probability is small).
guipatinador is correct. The mod resets all values at round end (glow, speed, gravity), along with the bonus player. It then chooses a new bonus player at the end of the freeze time and sets all powers.

EDIT: if the bonus player makes it through the round without getting attackd....he may just keep the armor points, i'm not sure. But i don't, personally, see that as too bad of a flaw.
__________________
What an elegant solution to a problem that doesn't need solving....

Last edited by Liverwiz; 10-08-2012 at 08:19.
Liverwiz is offline
tre3fla
Member
Join Date: Jul 2012
Old 10-08-2012 , 11:01   Re: [Request] Plugin who gives some bonuses
Reply With Quote #8

Thank you verry much for the plugin. I will test it today.
tre3fla is offline
TedMan
Senior Member
Join Date: Oct 2012
Old 10-21-2012 , 02:33   Re: [Request] Plugin who gives some bonuses
Reply With Quote #9

I have a problem with this plugin... the message do no show to anyone..
A random player gets the powers but the info message not appear ...
TedMan is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 10-21-2012 , 08:32   Re: [Request] Plugin who gives some bonuses
Reply With Quote #10

Quote:
Originally Posted by TedMan View Post
I have a problem with this plugin... the message do no show to anyone..
A random player gets the powers but the info message not appear ...
Are there any errors in your error logs?
__________________
What an elegant solution to a problem that doesn't need solving....
Liverwiz 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 10:02.


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