This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Unleash the Rage!


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff       
unnyquee
Senior Member
Join Date: Jun 2009
Location: Constanta, Romania
Old 10-28-2009 , 15:09   Unleash the Rage!
Reply With Quote #1

Unleash the Rage!
(version 1.1b)


Description:
Recommended Counter-Strike Mod: Hide-n-Seek
When a player reaches the number of frags required by "utr_ragefrags" cvar, he will get several benefits and effects like:
- lower gravity
- higher maxspeed
- health regeneration
- red fade-out effect
- red glow effect
- hudmessage announce

Required Modules:
- Fun
- Hamsandwich

Cvars:
utr_status <0/1> - plugin disabled/enabled (default: 1)
utr_ragefrags <frags> - number of frags at a player becomes enraged (default: 5)
utr_ragetime <seconds> - duration of rage, in seconds (default: 10)

Changelog:
v1.0 - First Release
v1.0b - Code optimization
v1.1 - Health regeneration effect added
v1.1b - Code optimization

Credits:
Xellath - Helpin' with code optimization
Javivi - Helpin' with code optimization
xPaw - Helpin' with code optimization
Exolent[jNr] - Helpin' with code optimization

Any bugs, errors or w/e.. reply here
Attached Files
File Type: sma Get Plugin or Get Source (unleash_the_rage.sma - 817 views - 4.6 KB)
__________________

Last edited by unnyquee; 11-18-2009 at 07:01.
unnyquee is offline
Xellath
Veteran Member
Join Date: Dec 2007
Location: Sweden
Old 10-28-2009 , 15:31   Re: Unleash the Rage!
Reply With Quote #2

Things you should correct:
  • Increase the array size of g_iKills and g_bIsEnraged by 1.
  • In your deathmsg event you should check whether the attacker is a player or not. ( 1 <= attacker <= maxplayers )
  • In your _setRage() function, you could use get_pcvar_float() instead of float().
  • The regular maxspeed in CS is 250.0(260.0 for scout), not 280.0. You could take a look in Jon's HNS mod how he resets the speed. (Exolent's new beta has this too)
  • You could remove <amxmisc> since you're not using it. It's not really necessary, but it prevents the compiler from loading in un-used functions and stocks.
  • You should also reset g_iKills and g_bIsEnraged in client_disconnect(), that prevents future clients from getting the abilities.

Anyway, good job.

EDIT: Woah. Forgot to mention the indenting. Please indent your code properly, it makes it a lot easier to read the code and will not throw indentation warnings.
__________________
Achievements API - a simple way for you to create your OWN custom achievements!

Last edited by Xellath; 10-28-2009 at 15:41.
Xellath is offline
unnyquee
Senior Member
Join Date: Jun 2009
Location: Constanta, Romania
Old 10-28-2009 , 15:47   Re: Unleash the Rage!
Reply With Quote #3

Version 1.0b released (code optimization).
Thx Xellath! (+k)
__________________
unnyquee is offline
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 10-28-2009 , 16:48   Re: Unleash the Rage!
Reply With Quote #4

These type of plugins are found within others and can do/have better performances.

This is just a gravity...hp...speed type of plugin.
__________________
DruGzOG is offline
Send a message via AIM to DruGzOG
Javivi
AlliedModders Donor
Join Date: Dec 2008
Old 10-28-2009 , 17:37   Re: Unleash the Rage!
Reply With Quote #5

You can change this:

set_user_rendering(index, kRenderFxNone, 0, 0, 0, kRenderNormal, 0);


to this:

set_user_rendering(index)
__________________
Javivi is offline
lowled
Senior Member
Join Date: Sep 2007
Old 10-28-2009 , 18:40   Re: Unleash the Rage!
Reply With Quote #6

Quote:
When a player reaches the number of frags required by "utr_ragefrags" cvar
in one round ?
__________________
lowled is offline
unnyquee
Senior Member
Join Date: Jun 2009
Location: Constanta, Romania
Old 10-29-2009 , 08:11   Re: Unleash the Rage!
Reply With Quote #7

@ DruGzOG: Yes, you're right.. but I wanted to add to the Hide-n-Seek gameplay, more fun .. It's kinda simple, I know.. but.. let's have some fun

@ Javivi: Done. Thx (+k)

@ lowled: Yes.. on every spawn, the effects disappear
__________________
unnyquee is offline
unnyquee
Senior Member
Join Date: Jun 2009
Location: Constanta, Romania
Old 10-30-2009 , 09:05   Re: Unleash the Rage!
Reply With Quote #8

NEW!
* Health regeneration effect (+2 hp)
__________________
unnyquee is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 10-30-2009 , 10:05   Re: Unleash the Rage!
Reply With Quote #9

You can do #define IsPlayer(%1) ( 1 <= %1 <= g_MaxPlayers )
instead of stock

PHP Code:
public _resetRage(index)
{
      
index -= 123
Remove this index -= 123, overthise the reset wont work
__________________
xPaw is offline
unnyquee
Senior Member
Join Date: Jun 2009
Location: Constanta, Romania
Old 10-30-2009 , 10:12   Re: Unleash the Rage!
Reply With Quote #10

The part:
PHP Code:
index -= 123
Is because I set an unique ID to the task, and I extract from task, only the index

Added #define IsPlayer instead of stock! Thx xPaw
__________________

Last edited by unnyquee; 10-30-2009 at 10:17.
unnyquee 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 04:03.


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