Raised This Month: $90 Target: $400
 22% 

Panic v1.0


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Gameplay       
thEsp
Senior Member
Join Date: Aug 2017
Location: Gjilan, Albania
Old 03-15-2019 , 16:35   Panic v1.0
Reply With Quote #1

Description

This plugin is simple as is it sounds. It basically starts a 'panic' to users which are in (or below) specified HP. If that is reached, user's screen will start to shake and become red as well as user gets damaged.

Commands

CVar | Default value | Description
  • amx_panic_hp | 20 | Health when panic starts
  • amx_panic_damage | 1 | Damage dealt to users by panic
  • amx_panic_chance | 2 | Chance to deal the damage abovementioned ^

Attention

Tested with bots, seems to be working fine.
If you find any bug with this plugin, please submit it !
Attached Files
File Type: sma Get Plugin or Get Source (amx_panic.sma - 12 views - 1.2 KB)
__________________
Hobby: Gaming, Coding, Rap (TheBloodyAlboz, E7, Tram 11, P.I.N.T, Death Row, Bolesna Braca)
YT Channel

Last edited by thEsp; 03-15-2019 at 17:11.
thEsp is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 03-15-2019 , 16:48   Re: Panic v1.0
Reply With Quote #2

PreThink is called hundreds of times per second, a bad place to send uncontrolled messages from.
Use "Health" event with a task instead.

PHP Code:
random_num(01000) <= panic_chance 
People would expect a chance CVAR to be in "percents", at least specify 2 is actually 0.2%

You only need to cache msgid once in plugin_init, message ids don't change during game.

Feature suggestion: Add a way to restore the player back to normal (for example, when they score a kill). Otherwise, it becomes a certain death without a way to gain hp.
__________________

Last edited by <VeCo>; 03-16-2019 at 06:13.
<VeCo> is offline
thEsp
Senior Member
Join Date: Aug 2017
Location: Gjilan, Albania
Old 03-15-2019 , 17:04   Re: Panic v1.0
Reply With Quote #3

Quote:
Originally Posted by <VeCo> View Post
PreThink is called hundreds of times per second, a bad place to send uncontrolled messages from.
Use "Health" event with a task instead.

PHP Code:
random_num(01000) <= panic_chance 
People would expect a chance CVAR to be in "percents", at least specify 2 is actually 0.02%

You only need to cache msgid once in plugin_init, message ids don't change during game.

Feature suggestion: Add a way to restore the player back to normal (for example, when they score a kill). Otherwise, it becomes a certain death without a way to gain hp.
I will do exactly what you said in next version. I used 1000 since with 100, damage drops down way to fast considering the event. But now the problem is that user will not be damaged, with tasks, I find it boring (And even the suggestion may not be possible AT THE FIRST LOOK). For the message, I fixed that. I'll edit the post as soon as I reply.
But for the feature(s), there exists one plugin which heals users once they kill someone.
__________________
Hobby: Gaming, Coding, Rap (TheBloodyAlboz, E7, Tram 11, P.I.N.T, Death Row, Bolesna Braca)
YT Channel
thEsp is offline
DJEarthQuake
Senior Member
Join Date: Jan 2014
Location: Midwest
Old 03-16-2019 , 13:51   Re: Panic v1.0
Reply With Quote #4

It's cool you did this. I just finished one for haptic feedback on the hits. The colors and reactions are slightly different from when the damage comes from bot or human. I just thought it would be funny to have victims make scientist cry sound on hit since there is nothing for Opposing Force out there like bullet damage on cstrike has. This would be good for DoD especially, your little panic mod. I wish you could make it even more realistic for DoD but we have some policies here.
__________________
"It's not the actual programming that's interesting. But it's what you can accomplish with the end results that are important." -Dennis Ritchie
"Mathematics, rightly viewed, possesses not only truth, but supreme beauty a beauty cold and austere, like that of sculpture..." -Bertrand Russell

Last edited by DJEarthQuake; 03-16-2019 at 13:55.
DJEarthQuake is offline
Reply


Thread Tools
Display Modes

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 20:40.


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