AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved/Old Plugins (https://forums.alliedmods.net/forumdisplay.php?f=27)
-   -   Quickly Throwing Grenade (With grenade cooking ability!) (https://forums.alliedmods.net/showthread.php?t=321698)

LunaTheReborn 02-24-2020 05:07

Quickly Throwing Grenade (With grenade cooking ability!)
 
1 Attachment(s)
Description
This plugin is simple. It allows you to assign a key to 1-key throwing HE grenade, just like what COD and R6:S do. You may also hold it, but remember, you are also COOKING it just what would happen in those two games.

Settings
If you wish to use your own model instead of my friend's, you may open the sma file then edit line 12~22: you can simply change from HE to FB or SG, and fill your model animation data.

Keybind
Although I registered two cmds, but you only need to bind one:
"+qtg"
for example:
bind MOUSE3 "+qtg" // this will allow you to throw grenades by pressing your mouse wheel.
bind MOUSE4 "+qtg" // this will allow you to throw grenades by pressing your mouse side key.

CVAR
QTG_ProgressBarLength [Int. Default: 20] // [<=0 : Hide progress bar.] [Otherwise: The progressbar length.]
QTG_FuseLengthInSec [Float. Default: -1] // [<=0 : Don't touch anything regarding fuse length.] [Otherwise: Set the fuse length as it says.]

Includes
Just an offset.inc from ....like 7 or 8 years ago? I only edit it once to fix some naming problems.

Tested & Works on
AmxModX 1.8.1
AmxModX 1.8.2
AmxModX 1.9.0 beta

Supported Games
CS:CZ (Latest Steam Ver.)
CS (Latest Steam Ver.)

Reference Books
ReGameDLL_CS project. I take my learning note (in English) inside the plugin, hope you don't mind.

Credits
Matoilet (used to my model partner, who is no longer interested in original CS anymore) for the models included in .zip file.

Bugs you might meet
As I am Chinese, I am saving this .sma in UTF-8 format with Notepad++. This MIGHT cause some compiling problems.
When you suffering from this:
1. Please do accept my apology. I just don't know to convert it to ANSI encoding. My NP++ always turns it back to UTF-8 whenever I re-open it.
2. Delete the first line(remove any non-Latin characters) of my .sma and click "Save As" with Windows Notepad, choose "ANSI" encoding from the lower part of the panel. After re-saved it, try it again, it should be fine now.
3. There is a UTF8 character in line 211 of the source file. I chose the character for the customized progress bar. Should you met any compiling problem, replace that character with an ASCII character will do.

DruGzOG 02-24-2020 13:54

Re: Quickly Throwing Grenade
 
https://forums.alliedmods.net/showthread.php?p=610698
https://forums.alliedmods.net/showthread.php?p=754908
https://forums.alliedmods.net/showthread.php?p=618307

LunaTheReborn 02-24-2020 20:10

Re: Quickly Throwing Grenade
 
Thank your for your notification!
Should I delete this post now? (the rule of duplicate contents is unclear... at least to me)

gabuch2 02-26-2020 13:16

Re: Quickly Throwing Grenade
 
There is no rule against "duplication" but if you are making a plugin about an idea that's already done you should explain what your plugin does that others don't.

HamletEagle 04-09-2020 05:12

Re: Quickly Throwing Grenade
 
Unapproved.

LunaTheReborn 03-21-2021 06:32

Re: Quickly Throwing Grenade
 
Quote:

Originally Posted by HamletEagle (Post 2691898)
Unapproved.

Hi,
Can I re-apply for approval since I made a function update regarding grenade cooking?
I check the other plugins you quoted and I don't think those plugins have the cooking ability.

HamletEagle 03-21-2021 07:02

Re: Quickly Throwing Grenade (With grenade cooking ability!)
 
Sure you can, but I'm pretty busy right now so I won't be able to review soon.
What I can say right now is that you are not allowed to upload amxx files and you should not have harcoded configurations inside the source file. Users must be able to change any settings by using cvars/files, without recompiling.

DJEarthQuake 03-22-2021 16:34

Re: Quickly Throwing Grenade (With grenade cooking ability!)
 
Keep in mind 'cooking' is slang not everybody knows. Stock Half-Life has 'cooking' without a CVAR already.

Quote:

Originally Posted by LunaTheReborn (Post 2684878)
whenever I re-open it.

All my files are in UTF-8 already and I have no history of whatever you are taking about.
If ever really that such situation:
Do not reopen it once saved for upload. Keep a copy you edit in one place and ANSI version to share elsewhere.

LunaTheReborn 03-23-2021 04:38

Re: Quickly Throwing Grenade (With grenade cooking ability!)
 
Quote:

Originally Posted by HamletEagle (Post 2741154)
Sure you can, but I'm pretty busy right now so I won't be able to review soon.
What I can say right now is that you are not allowed to upload amxx files and you should not have harcoded configurations inside the source file. Users must be able to change any settings by using cvars/files, without recompiling.

Thank you & take your time!
I changed my code so that all configurations are depending on pcvars now.
And also, I removed the compiled amxx file in .zip.


All times are GMT -4. The time now is 04:51.

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