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

Short Nade - Right click throw like in CS:GO


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands       
Grzyboo
Junior Member
Join Date: Apr 2011
Old 02-21-2015 , 12:00   Short Nade - Right click throw like in CS:GO
Reply With Quote #1

Some time ago I wrote this plugin. Haven't found anything like that.

Description
Basically, people who play CS:GO should know what I mean.
If you have a grenade in your hand and throw it with the right mouse button it will be thrown with much lower force.
Cvar makes it possible to additionally decrease the cooldown before explosion.
Cvar(s)
amx_shortnade_blow "1.0" - Time to blow in format of a multiplier [realtime * value].
It means that if you put 0.5 here, it will take a grenade to blow after half of normal time.
Installation
Nothing special, shortnade.amxx into addons/amxmodx/plugins/ and write it down in addons/amxmodx/configs/plugins.ini
Note
After a few hundreds hours in CS:GO it annoys me when I can't use a short flash. I just felt like this plugin might be useful.
Attached Files
File Type: sma Get Plugin or Get Source (shortnade.sma - 1567 views - 2.1 KB)
Grzyboo is offline
tousif
AlliedModders Donor
Join Date: Nov 2014
Location: India
Old 02-22-2015 , 03:06   Re: Short Nade - Right click throw like in CS:GO
Reply With Quote #2

Can u explain more plzz
tousif is offline
GinNNy
Senior Member
Join Date: Mar 2014
Old 02-22-2015 , 04:41   Re: Short Nade - Right click throw like in CS:GO
Reply With Quote #3

Quote:
Originally Posted by tousif View Post
Can u explain more plzz
The plugins says it.
it means if you click mouse2 or right click you will throw the nade in shorter distance.
GinNNy is offline
FR0NTLINE
AlliedModders Donor
Join Date: Apr 2006
Location: Riverside Cali
Old 02-24-2015 , 15:49   Re: Short Nade - Right click throw like in CS:GO
Reply With Quote #4

Very cool plugin.
__________________
FR0NTLINE is offline
Send a message via AIM to FR0NTLINE Send a message via MSN to FR0NTLINE Send a message via Yahoo to FR0NTLINE
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 02-25-2015 , 07:05   Re: Short Nade - Right click throw like in CS:GO
Reply With Quote #5

Wanted to make the same plugin, guess I was too lazy to actually start then, but nice to see someone made it.
Good job.
__________________
Kia is offline
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 03-03-2015 , 02:22   Re: Short Nade - Right click throw like in CS:GO
Reply With Quote #6

You should not be using a forward as consuming as CPU CmdStart for something as simple as this. You can hook SecondaryAttack() with grenades so that should be all you need, and as for using SetModel() you can just use grenade_throw forward from CSX module which will also be more efficient.

Also, you could make it more interesting? Like adding power cvars or even use BarTime message to display throw power?
hornet is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 03-04-2015 , 18:30   Re: Short Nade - Right click throw like in CS:GO
Reply With Quote #7

Don't supercede CmdStart.
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 03-16-2015 , 21:24   Re: Short Nade - Right click throw like in CS:GO
Reply With Quote #8

No attempt to make changes has been shown in 2 weeks. Unapproved.
hornet is offline
proffs
Senior Member
Join Date: Jul 2013
Old 04-26-2015 , 11:25   Re: Short Nade - Right click throw like in CS:GO
Reply With Quote #9

Quote:
Originally Posted by hornet View Post
No attempt to make changes has been shown in 2 weeks. Unapproved.
Could you possible update this plugin with the way you recomended him?`
I really love this feature on CSGO and would love to use it on 1.6
proffs is offline
interp124
New Member
Join Date: Jan 2010
Old 03-06-2016 , 14:11   Re: Short Nade - Right click throw like in CS:GO
Reply With Quote #10

PHP Code:
#include <amxmodx>
#include <fakemeta>

new bool:throws[33];

public 
plugin_init() {
    
register_plugin("Short Nade""1.0""Grzyboo");
    
register_forward(FM_PlayerPreThink"fwPlayerPreThink");
}

public 
fwPlayerPreThink(player_id) {
    static 
weapon_ammoweapon_clip;
    new 
weapon_id get_user_weapon(player_idweapon_clipweapon_ammo);
    if(
weapon_id != CSW_HEGRENADE && weapon_id != CSW_FLASHBANG && weapon_id != CSW_SMOKEGRENADE)
        return 
FMRES_IGNORED;
    
    if(
throws[player_id] && pev(player_idpev_button) & IN_ATTACK)
        
throws[player_id] = false;
    
    if(
pev(player_idpev_button) & IN_ATTACK2) {
        
throws[player_id] = true;
        
        
set_pev(player_idpev_buttonpev(player_idpev_button) & ~IN_ATTACK2);
        
set_pev(player_idpev_buttonpev(player_idpev_button) | IN_ATTACK);
        
        return 
FMRES_SUPERCEDE;
    }
    return 
FMRES_IGNORED;
}

public 
grenade_throw(player_idgrenade_idgrenade_type) {
    if(!
is_user_connected(player_id))
        return 
FMRES_IGNORED;

    if(
throws[player_id]) {
        static 
Float:velocity[3];
        
pev(grenade_idpev_velocityvelocity);
        
velocity[0] *= 0.5;
        
velocity[1] *= 0.5;
        
velocity[2] *= 0.5;
        
set_pev(grenade_idpev_velocityvelocity);
        
        static 
Float:origin[3];
        
pev(grenade_idpev_originorigin);
        
origin[2] -= 24.0;
        
set_pev(grenade_idpev_originorigin);
        
        
throws[player_id] = false;
        
        return 
FMRES_IGNORED;
    }
    return 
FMRES_IGNORED;


Last edited by interp124; 03-06-2016 at 14:28.
interp124 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 08:00.


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