AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [SOLVED]Launch grenade instantly (https://forums.alliedmods.net/showthread.php?t=242527)

GuskiS 06-20-2014 17:27

[SOLVED]Launch grenade instantly
 
How can I make grenade launch instant? For example, when you take grenade, press attack, it pulls pin, when you release it, throwing event starts. I want when you press attack, nade starts throwing event instantly. It might be some kind of offset, but I can't find it.

EDIT: Or, do I have to change FM_PlaybackEvent do that?

EDIT2: There is no event for grenade in events/ folder.

r0ck 06-21-2014 01:12

Re: Launch grenade instantly
 
check out this if it helps you https://forums.alliedmods.net/showthread.php?p=754908

GuskiS 06-21-2014 05:36

Re: Launch grenade instantly
 
I have seen this, it just makes binds for auto grenade throwing. That is not what I need.

devilicioux 06-21-2014 06:51

Re: Launch grenade instantly
 
Off-Topic Question Related to this topic ..

Does this grenade launch event act as a a grenade reload event ?

If yes .. You can try hooking the reload event and do some modifications ..

Edit : check this too..
https://forums.alliedmods.net/showthread.php?p=618307

hornet 06-21-2014 07:54

Re: Launch grenade instantly
 
If you wish to throw grenades like a boss, then this is how it would be done:
Code:
#include <amxmodx> #include <hamsandwich> #include <fakemeta> #define VERSION         "0.0.1" #define XO_WEAPON       4 #define m_flTimeWeaponIdle  48 public plugin_init() {     register_plugin( "Instant Grenade Throw", VERSION, "hornet" );         RegisterHam( Ham_Weapon_PrimaryAttack, "weapon_hegrenade", "CHEGrenade_PrimaryAttack" ); } public CHEGrenade_PrimaryAttack( iEnt ) {     set_pdata_float( iEnt, m_flTimeWeaponIdle, 0.0, XO_WEAPON );     ExecuteHam( Ham_Weapon_WeaponIdle, iEnt ); }

GuskiS 06-21-2014 13:26

Re: Launch grenade instantly
 
Thanks hornet, just the thing I was looking for :) Solved.


All times are GMT -4. The time now is 21:16.

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