Raised This Month: $12 Target: $400
 3% 

Quickly Throwing Grenade (With grenade cooking ability!)


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Gameplay       
LunaTheReborn
Junior Member
Join Date: Feb 2020
Old 02-24-2020 , 05:07   Quickly Throwing Grenade (With grenade cooking ability!)
Reply With Quote #1

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.
Attached Files
File Type: zip QuickGrenade.zip (502.0 KB, 127 views)

Last edited by LunaTheReborn; 03-23-2021 at 04:34. Reason: Edit the title with update.
LunaTheReborn is offline
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 02-24-2020 , 13:54   Re: Quickly Throwing Grenade
Reply With Quote #2

https://forums.alliedmods.net/showthread.php?p=610698
https://forums.alliedmods.net/showthread.php?p=754908
https://forums.alliedmods.net/showthread.php?p=618307
__________________
DruGzOG is offline
Send a message via AIM to DruGzOG
LunaTheReborn
Junior Member
Join Date: Feb 2020
Old 02-24-2020 , 20:10   Re: Quickly Throwing Grenade
Reply With Quote #3

Thank your for your notification!
Should I delete this post now? (the rule of duplicate contents is unclear... at least to me)
LunaTheReborn is offline
gabuch2
AlliedModders Donor
Join Date: Mar 2011
Location: Chile
Old 02-26-2020 , 13:16   Re: Quickly Throwing Grenade
Reply With Quote #4

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.
__________________
gabuch2 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 04-09-2020 , 05:12   Re: Quickly Throwing Grenade
Reply With Quote #5

Unapproved.
__________________
HamletEagle is offline
LunaTheReborn
Junior Member
Join Date: Feb 2020
Old 03-21-2021 , 06:32   Re: Quickly Throwing Grenade
Reply With Quote #6

Quote:
Originally Posted by HamletEagle View Post
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.
LunaTheReborn is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 03-21-2021 , 07:02   Re: Quickly Throwing Grenade (With grenade cooking ability!)
Reply With Quote #7

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.
__________________
HamletEagle is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 03-22-2021 , 16:34   Re: Quickly Throwing Grenade (With grenade cooking ability!)
Reply With Quote #8

Keep in mind 'cooking' is slang not everybody knows. Stock Half-Life has 'cooking' without a CVAR already.

Quote:
Originally Posted by LunaTheReborn View Post
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.
__________________

Last edited by DJEarthQuake; 03-22-2021 at 16:39. Reason: Validated my sma files.
DJEarthQuake is offline
LunaTheReborn
Junior Member
Join Date: Feb 2020
Old 03-23-2021 , 04:38   Re: Quickly Throwing Grenade (With grenade cooking ability!)
Reply With Quote #9

Quote:
Originally Posted by HamletEagle View Post
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.
LunaTheReborn 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 07:06.


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