AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Real Grenades Behavior [11 may updated] (https://forums.alliedmods.net/showthread.php?t=70642)

Salamon 04-28-2008 17:19

Real Grenades Behavior [11 may updated]
 
1 Attachment(s)
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 :arrow: 1 is turning on grenade speed manipulation, 0 turning off
- rgb_speedtime_1
:arrow: 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
:arrow: 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
:arrow: 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 :arrow: 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 :arrow: 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 :arrow: 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 :arrow: 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

soccdoodcss 04-28-2008 22:20

Re: Real Grenades Behavior
 
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().

Salamon 04-29-2008 03:23

Re: Real Grenades Behavior
 
thx for tips, i was writing this in 0.0 my time :D :P

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

AlexBreems 04-29-2008 06:41

Re: Real Grenades Behavior
 
Good plugin
Respect to author :)

soccdoodcss 04-29-2008 07:34

Re: Real Grenades Behavior
 
Quote:

Originally Posted by Salamon (Post 618451)
thx for tips, i was writing this in 0.0 my time :D :P

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.

Salamon 04-29-2008 13:43

Re: Real Grenades Behavior
 
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 :>

soccdoodcss 04-29-2008 16:21

Re: Real Grenades Behavior
 
Quote:

Originally Posted by Salamon (Post 618701)
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.

Salamon 04-29-2008 16:32

Re: Real Grenades Behavior
 
:> ok now can someone test it to be suuuuuure about working like it should from description ? :D i think this is needed for approval? :P

FuZ!on 04-29-2008 17:14

Re: Real Grenades Behavior
 
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?

Salamon 04-29-2008 17:35

Re: Real Grenades Behavior
 
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? :D

all mechanisms that are started with use button, normal you need a free hands to do a sandwitch or something, am i right? :D (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:P)


All times are GMT -4. The time now is 09:37.

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