Raised This Month: $95 Target: $400
 23% 

Real Grenades Behavior [11 may updated]


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands        Approver:   Emp` (115)
Salamon
Senior Member
Join Date: Dec 2007
Location: P(r)oland
Old 04-28-2008 , 18:19   Real Grenades Behavior [11 may updated]
Reply With Quote #1

Real Grenades Behavior
||||||
||||||||| |||||||||

Description:

Plugin allows you to block unrealistic and funny grenades behavior, when you have pulled out the cotter pin from them (in the red circle) and still you could change, pick up, buy a weapon and you had like a new grenade with new cotter pin. You could use all mechanisms, and defuse a bomb too! With one hand, almost impossible. No more unrealistic situations! With this plugin player when he will pull out cotter pin, he cant pick up nothing, buy nothing, use mechanisms/defuse a bomb, and change weapon (small advice, when you will use "invprev" or "invnext" grenade will be thrown automatic).

Added new version with grenade speed, when you will throw grenade quick after putting out the pin, you will throw it very close, cause u didnt had time to throw it harder. After some moment you will gain more power to throw it and you will do it a little better. After another moment you will have full power to throw it as far as you can.

Cvars:

You can change name of all cvars in .sma

- rgb 0 turn off the plugin
- rgb 1 turn on the plugin
- rgb 2 doesnt affect on admins (default ADMIN_IMMUNITY is needed), you can change it in .sma in "#define IMMUNITY" line

- rgb_speed 1 1 is turning on grenade speed manipulation, 0 turning off
- rgb_speedtime_1
a value in seconds after first speed point will be added(the most optimal is 0.8-0.9 cause pulling out the pin costs ~0.7 sec)
- rgb_speedtime_2
a value in seconds after next (2) and 3 speed point will be added, to gain all 3 points you need time from rgb_speedtime_1 + 2x rgb_speedtime_2
- rgb_bartime
how long the progressbar will be shown when pulling out the pin (must be full number not fraction! if 0 turn off)
- rgb_speed_0 a value in percent (i mean 0.2 = 20%, 0.5 = 50% 1=100%) of throwing speed with 0 speed points (default 0.25 (25%) )
- rgb_speed_1 a value in percent (i mean 0.2 = 20%, 0.5 = 50% 1=100%) of throwing speed with 1 speed points (default 0.5 (50%) )
- rgb_speed_2 a value in percent (i mean 0.2 = 20%, 0.5 = 50% 1=100%) of throwing speed with 2 speed points (default 0.75 (75%) )
- rgb_speed_3 a value in percent (i mean 0.2 = 20%, 0.5 = 50% 1=100%) of throwing speed with 3 speed points (default 1 (100%) )

Credits/idea:

I dont know if such a plugin exist, i didnt saw any, idea and performance by me :>

Changelog:

1.0 - first idea
1.5 - made some fixes still local ^^
2.0 - done and posted
2.2 - updated with
soccdoodcss tips
2.3 - small edit and converted from <engine> to <fakemeta>
2.5 - added new version (dont know if work properly for sure, someone must test it) with grenade speed, device idea, and X-olent help with script
2.7 - added cvars to all + added 'progressbar' from AlexBreems idea and fixed a small bug with pin

Works:

For sure works on counter strike 1.6, if someone want to, can check other similar games

Screens:

To realize
exactly what i'm talking about, i made 3 simple screens and took 1 picture from internet of grenades, in the red circle you can see cotter pin, if you pull it out, you just cant normal put it on back :>
To see a grenade speed effect, just install plugin, and throw grenade as fast as you can after pulling out the pin ;>

http://upload.wikimedia.org/wikipedi...-67Grenade.jpg

http://img263.**************/img263/2857/54591931pa4.png

http://img132.**************/img132/4251/21268228lq5.png

http://img132.**************/img132/5084/67414585jl9.png
Attached Files
File Type: sma Get Plugin or Get Source (real_grenades_behavior.sma - 1723 views - 8.0 KB)
__________________
This is 10% luck, 20% skill, 15% concentrated power of will,
5% pleasure, 50% pain and 100% reason to remember my name..

Last edited by Salamon; 05-11-2008 at 13:40. Reason: updating - bugfix & code change
Salamon is offline
soccdoodcss
Veteran Member
Join Date: Nov 2006
Location: Wisconsin
Old 04-28-2008 , 23:20   Re: Real Grenades Behavior
Reply With Quote #2

Sounds like a good idea.
However, register the client commands whether the pcvar is on or off. Instead, check if the plugin is off when it attempts to block the command. Otherwise you will have to change the map to change the status of the plugin.

Also, change:
PHP Code:
new tcliptammo
new weapon get_user_weapon(id,tclip,tammo)
    
if (
get_pcvar_num(rgb_cvar) == 0)
    return 
PLUGIN_HANDLED 
to:
PHP Code:
if (!get_pcvar_num(rgb_cvar))
     return 
PLUGIN_HANDLED

new weapon get_user_weapon(id
If the plugin is off, why bother finding the user's weapon? Especially considering how often prethink is called.
Plus, with version 1.8.0 you don't have to add the extra crap in get_user_weapon().
__________________
"Now safe beneath their wisdom and their feet.
Here I will teach you truly how to sleep."

Last edited by soccdoodcss; 04-28-2008 at 23:33.
soccdoodcss is offline
Send a message via AIM to soccdoodcss
Salamon
Senior Member
Join Date: Dec 2007
Location: P(r)oland
Old 04-29-2008 , 04:23   Re: Real Grenades Behavior
Reply With Quote #3

thx for tips, i was writing this in 0.0 my time

now i think all is fixed, btw:

i dont wanna to use hamsandwitch cause not all server is using ver. of amxx 1.80, i wanted to make a 1.76 & 1.75 friendly (i hope) version not only for the newest, not all ppl want or can have it
__________________
This is 10% luck, 20% skill, 15% concentrated power of will,
5% pleasure, 50% pain and 100% reason to remember my name..
Salamon is offline
AlexBreems
Member
Join Date: Feb 2008
Old 04-29-2008 , 07:41   Re: Real Grenades Behavior
Reply With Quote #4

Good plugin
Respect to author
__________________
AlexBreems is offline
soccdoodcss
Veteran Member
Join Date: Nov 2006
Location: Wisconsin
Old 04-29-2008 , 08:34   Re: Real Grenades Behavior
Reply With Quote #5

Quote:
Originally Posted by Salamon View Post
thx for tips, i was writing this in 0.0 my time

now i think all is fixed, btw:

i dont wanna to use hamsandwitch cause not all server is using ver. of amxx 1.80, i wanted to make a 1.76 & 1.75 friendly (i hope) version not only for the newest, not all ppl want or can have it
That's fine, none of the changes I suggested involved hamsandwich so you are fine.
__________________
"Now safe beneath their wisdom and their feet.
Here I will teach you truly how to sleep."
soccdoodcss is offline
Send a message via AIM to soccdoodcss
Salamon
Senior Member
Join Date: Dec 2007
Location: P(r)oland
Old 04-29-2008 , 14:43   Re: Real Grenades Behavior
Reply With Quote #6

made a small update, converted from <engine> to <fakemeta> and added +use button block to dont allow using mechanisms & defuse a bomb with armed grenade :>
__________________
This is 10% luck, 20% skill, 15% concentrated power of will,
5% pleasure, 50% pain and 100% reason to remember my name..
Salamon is offline
soccdoodcss
Veteran Member
Join Date: Nov 2006
Location: Wisconsin
Old 04-29-2008 , 17:21   Re: Real Grenades Behavior
Reply With Quote #7

Quote:
Originally Posted by Salamon View Post
made a small update, converted from <engine> to <fakemeta> and added +use button block to dont allow using mechanisms & defuse a bomb with armed grenade :>
Fakemeta is a good idea. Also, nice new feature.
__________________
"Now safe beneath their wisdom and their feet.
Here I will teach you truly how to sleep."
soccdoodcss is offline
Send a message via AIM to soccdoodcss
Salamon
Senior Member
Join Date: Dec 2007
Location: P(r)oland
Old 04-29-2008 , 17:32   Re: Real Grenades Behavior
Reply With Quote #8

:> ok now can someone test it to be suuuuuure about working like it should from description ? i think this is needed for approval?
__________________
This is 10% luck, 20% skill, 15% concentrated power of will,
5% pleasure, 50% pain and 100% reason to remember my name..
Salamon is offline
FuZ!on
Senior Member
Join Date: Aug 2007
Old 04-29-2008 , 18:14   Re: Real Grenades Behavior
Reply With Quote #9

So with this plug in, if I pull out the pin, I will not be able to rescue a hostage until I throw the nade?
FuZ!on is offline
Salamon
Senior Member
Join Date: Dec 2007
Location: P(r)oland
Old 04-29-2008 , 18:35   Re: Real Grenades Behavior
Reply With Quote #10

yea, this is idea of this plugin, if you will think about it more, realize the situation of 'real' hostage. He will see a man (maybe some crazy idiot) with an ARMED grenade in hand, will you go with him?

all mechanisms that are started with use button, normal you need a free hands to do a sandwitch or something, am i right? (ok you can think ok, but when im holding any weapon i shoudn't use anything, but i did a plugin only for armed, dangerous grenades that you must be carefull with it)
__________________
This is 10% luck, 20% skill, 15% concentrated power of will,
5% pleasure, 50% pain and 100% reason to remember my name..
Salamon 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 01:57.


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