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

Long grenades v1.3


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Gameplay       
thEsp
BANNED
Join Date: Aug 2017
Old 06-25-2019 , 10:27   Long grenades v1.3
Reply With Quote #1

Long grenades v1.3

Description:
This plugin extends grenade's range of explosion.
Basically grenades won't explode until they reach ground and slow down.
However this might not work in ZP(or other mods) and when there's present a plugin which modifies grenades (in some cases).

CVar:
  • amx_longnades - Checks for specific grenade type ("fb" or "he") (D: "fb he")

Code:
Changelog: 
v1.0 (06/25/2019) - Initial release
v1.1 (06/25/2019) - Added "amx_longnades" CVar as proposed by Relaxing.
v1.2 (06/29/2019) - Fixed a issue, now fully supported by AMXX < 1.8.2
v1.3 (08/01/2019) - Removed most of the stocks, now there is a definition for measuring grenade velocity (len), made the HE/FB nades behave more alike SK nades.
View the difference below, both pictures are approximately from the same position. (click "Show spoiler" button)
Without

With
Attached Files
File Type: sma Get Plugin or Get Source (amx_longnades.sma - 134 views - 2.3 KB)

Last edited by thEsp; 07-31-2019 at 18:08. Reason: v1.3 release!
thEsp is offline
SHIELD755
Veteran Member
Join Date: Feb 2018
Location: FROM MARVEL STUDIO
Old 06-25-2019 , 13:11   Re: Long grenades v1.0
Reply With Quote #2

Awesome
__________________
SED LYF !!!

Last edited by SHIELD755; 06-25-2019 at 13:11.
SHIELD755 is offline
Old 06-25-2019, 13:19
thEsp
This message has been deleted by thEsp.
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 06-25-2019 , 16:02   Re: Long grenades v1.0
Reply With Quote #3

So can you make it so I specify to cover only for HE and Flash?
Something like amx_longnades "hfs".
__________________
Relaxing is offline
Old 06-25-2019, 16:06
thEsp
This message has been deleted by thEsp.
thEsp
BANNED
Join Date: Aug 2017
Old 06-25-2019 , 16:50   Re: Long grenades v1.1
Reply With Quote #4

Update as of 6/25/2019 10:49 PM (GMT+1):
v1.1 (6/25/2019) - Added "amx_longnades" CVar as proposed by Relaxing.
thEsp is offline
LearninG
Senior Member
Join Date: Apr 2019
Location: Iran
Old 06-26-2019 , 01:51   Re: Long grenades v1.1
Reply With Quote #5

simple and useful , good job
LearninG is offline
SHIELD755
Veteran Member
Join Date: Feb 2018
Location: FROM MARVEL STUDIO
Old 06-26-2019 , 07:37   Re: Long grenades v1.1
Reply With Quote #6

suggestion :- is it possible to add Grenade explosion time ? Like PUBG , after "x" seconds it will explode
__________________
SED LYF !!!
SHIELD755 is offline
thEsp
BANNED
Join Date: Aug 2017
Old 06-26-2019 , 10:06   Re: Long grenades v1.1
Reply With Quote #7

Nope, it's unpredictable. With some slightly modifications this plugin can have that feature.
thEsp is offline
DON KHAN 1
Senior Member
Join Date: Mar 2019
Location: Pakistan
Old 06-27-2019 , 11:47   Re: Long grenades v1.1
Reply With Quote #8

Nice Plugin I Will Try It
__________________
Facebook
My YouTube
Ro{Y}aL WarLanD CommuniTy
Selling Zombie CSO 4.3 Money System Mod
DON KHAN 1 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 06-29-2019 , 12:24   Re: Long grenades v1.1
Reply With Quote #9

1.Make it clear the plugin requires a beta version of amxx(due to get_pdata_bool) and it will not run in 1.8.2
2.Use real offset names, it's easier for others to understand your code.
Code:
IS_C4 -> m_bIsC4
GRENADE_TYPE -> m_usEvent
3. This is terribly useless:
PHP Code:
switch(speedVec[0] >= && speedVec[1] >= && speedVec[2] >= Z)
    {
        case 
false: return false
        
case true: return true
    
}
    return 
false 
Just do:
PHP Code:
return speedVec[0] >= && speedVec[1] >= && speedVec[2] >= 
Also, what's the point of the speed check? It's checking if the speed is higher than some value, not lower.

4.
PHP Code:
stock _:get_ent_dmgtime(entity)
{
    return 
pev(entity,pev_dmgtime)

->
PHP Code:
stock Float:get_ent_dmgtime(entity)
{
        new 
Float:dmg_time
    pev
(entity,pev_dmgtimedmg_time)
        return 
dmg_time

Float is passed by reference in pev.

5.cvar_nadetypes_str[32] should be local, inside grenade_throw.

6.set_ent_dmgtime has no reason to return something.
__________________

Last edited by HamletEagle; 06-29-2019 at 12:24.
HamletEagle is offline
thEsp
BANNED
Join Date: Aug 2017
Old 06-29-2019 , 12:56   Re: Long grenades v1.1
Reply With Quote #10

Oh thank you for the great advise Hamlet , I had no place other than local game to test it. I will re-write it asap.
thEsp is offline
Reply



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 15:45.


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