Raised This Month: $ Target: $400
 0% 

[HELP] Launching Grenades From Weapon


Post New Thread Reply   
 
Thread Tools Display Modes
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-29-2015 , 03:55   Re: [HELP] Launching Grenades From Weapon
Reply With Quote #41

How you would like to switch ? Like a command set_throw_grenade he/sg/fl. Then, after you write it press right click, it will check if you have the grenade you set up with the command and throw it ?
Also the bugs are easy to fix. Also, can you PM me or add here the plugin that change the grenades ? I would like to check something.
__________________

Last edited by HamletEagle; 08-29-2015 at 04:06.
HamletEagle is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 08-29-2015 , 07:54   Re: [HELP] Launching Grenades From Weapon
Reply With Quote #42

i would like to switch them by a hooking a button instead of doing it by command, to avoid binds
i think hooking invnext and invprev would be great

what do you mean by the plugin that change the grenades?
i didn't do something like that yet, i was thinking to go by this method
nade modes - https://forums.alliedmods.net/showthread.php?p=663892
Depresie is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-29-2015 , 08:45   Re: [HELP] Launching Grenades From Weapon
Reply With Quote #43

If I remember well invnext and invprev are not hookable. So, how he should choose what grenade to throw ? I can't know what you have in mind, so explain fully.
__________________

Last edited by HamletEagle; 08-29-2015 at 08:47.
HamletEagle is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 08-29-2015 , 09:15   Re: [HELP] Launching Grenades From Weapon
Reply With Quote #44

Well, i was thinking at something like it is in the Nade Mode
Player is pressing a button to switch to the next grenade type, a message will be displayed on the center for the screen telling the grenade type the user has choosen

Mhhm, about hooking invnext and invprev, you mean it doesn't work with hook command, right? wouldn't it work with hooking it via get_user_button like you did with right click in the Idle-AK function?

I kind of ran out of commands to hook on, i already hooked radio, nightvision and impulse 201 =\
And i would like to avoid commands that require binds...
If it wouldn't work with right click in the idle-AK function maybe we could hook the "cheer"

I will run couple of tests about this and i will come back with an edit

Last edited by Depresie; 08-29-2015 at 09:15.
Depresie is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-29-2015 , 09:22   Re: [HELP] Launching Grenades From Weapon
Reply With Quote #45

The only buttons that we can use with pev_button/pev_oldbutton are:
Code:
#define IN_ATTACK                       (1<<0)
#define IN_JUMP                         (1<<1)
#define IN_DUCK                         (1<<2)
#define IN_FORWARD                      (1<<3)
#define IN_BACK                         (1<<4)
#define IN_USE                          (1<<5)
#define IN_CANCEL                       (1<<6)
#define IN_LEFT                         (1<<7)
#define IN_RIGHT                        (1<<8)
#define IN_MOVELEFT                     (1<<9)
#define IN_MOVERIGHT                    (1<<10)
#define IN_ATTACK2                      (1<<11)
#define IN_RUN                          (1<<12)
#define IN_RELOAD                       (1<<13)
#define IN_ALT1                         (1<<14)
#define IN_SCORE                        (1<<15)
Yes, I have just tried to be sure, you can't hook them as commands.
__________________

Last edited by HamletEagle; 08-29-2015 at 09:23.
HamletEagle is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 08-29-2015 , 09:26   Re: [HELP] Launching Grenades From Weapon
Reply With Quote #46

i checked right now, yep, you are right
i think hooking cheer like this would do the trick, no binds required =D

Code:
register_clcmd("cheer", "Switch")
Depresie is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-29-2015 , 10:01   Re: [HELP] Launching Grenades From Weapon
Reply With Quote #47

Not everyone has this bind(because this command no longer exists), for example I don't have it(lastest Cs version). You should not use it.
__________________

Last edited by HamletEagle; 08-29-2015 at 10:07.
HamletEagle is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 08-29-2015 , 11:11   Re: [HELP] Launching Grenades From Weapon
Reply With Quote #48

for what i know IN_ALT1 doesn't work either... right?

what about these two?
Code:
k -> "+voicerecord"
l -> "showbriefing"

Last edited by Depresie; 08-29-2015 at 11:12.
Depresie is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-29-2015 , 11:32   Re: [HELP] Launching Grenades From Weapon
Reply With Quote #49

To hook voicerecord you will probably have to use this: https://forums.alliedmods.net/showthread.php?t=138497
showbriefing can't be hooked with register_ clcmd. I still don't understand why you don't want a custom command, just tell them to make a bind, not a big deal.

AFAIK ALT1 it's a combination of alt + left/right mouse turn. For example, keep pressing alt and turn your mouse to left.
__________________

Last edited by HamletEagle; 08-29-2015 at 11:36.
HamletEagle is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 08-29-2015 , 12:54   Re: [HELP] Launching Grenades From Weapon
Reply With Quote #50

well, the problem with the binds is that most of the players doesn't know how to make them...
also with binds they have to bind/unbind/bind on every server they go...

i tried showbriefing with register_clcmd, and it works
anyway do it with any button you want, i will find a more suitable button for it later
Depresie 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 00:41.


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