Raised This Month: $ Target: $400
 0% 

Block nade throwing.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
01101101
BANNED
Join Date: Nov 2009
Location: 9`su 09`n0n7e`r0f76a
Old 01-22-2010 , 04:15   Block nade throwing.
Reply With Quote #1

How can I block a nade from being throwed?
01101101 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-22-2010 , 04:32   Re: Block nade throwing.
Reply With Quote #2

By setting m_flNextPrimaryAttack or m_flStartThrow to a high value like 9999.0.
__________________
Arkshine is offline
01101101
BANNED
Join Date: Nov 2009
Location: 9`su 09`n0n7e`r0f76a
Old 01-22-2010 , 04:41   Re: Block nade throwing.
Reply With Quote #3

Quote:
Originally Posted by Arkshine View Post
By setting m_flNextPrimaryAttack or m_flStartThrow to a high value like 9999.0.
But then when setting it to a normal value wouldn't it throw it?

I was confused. Gotta try.

What I want to do is to block it after he pressed MOUSE1
01101101 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-22-2010 , 05:14   Re: Block nade throwing.
Reply With Quote #4

Why after "he pressed MOUSE1" ? You want to see the "pinpull" animation then blocking at this moment ?

I was meant above to let the grenade to be deployed then blocking at this moment and using +attack will do nothing.
__________________

Last edited by Arkshine; 01-22-2010 at 05:19.
Arkshine is offline
01101101
BANNED
Join Date: Nov 2009
Location: 9`su 09`n0n7e`r0f76a
Old 01-22-2010 , 05:32   Re: Block nade throwing.
Reply With Quote #5

Quote:
Originally Posted by Arkshine View Post
Why after "he pressed MOUSE1" ? You want to see the "pinpull" animation then blocking at this moment ?

I was meant above to let the grenade to be deployed then blocking at this moment and using +attack will do nothing.
Because I play with nade ammos. The guy can those a nade type (it is not nade modes, though it is sort of similar) with right click. Depending on the type, it will use either 1, 2 or 3 grenades. So, if the guy doesn't have 3 smokegrens, it won't be able to throw X type of nade.

So, what I need is to block in real time.
01101101 is offline
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 01-22-2010 , 13:48   Re: Block nade throwing.
Reply With Quote #6

Quote:
Originally Posted by 01101101 View Post
Because I play with nade ammos. The guy can those a nade type (it is not nade modes, though it is sort of similar) with right click. Depending on the type, it will use either 1, 2 or 3 grenades. So, if the guy doesn't have 3 smokegrens, it won't be able to throw X type of nade.

So, what I need is to block in real time.
Set pdata as Arkshine said just when player selects nade type.

If player changes nade type, so check if it can be throwed and set pdata again.
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 01-22-2010 , 15:06   Re: Block nade throwing.
Reply With Quote #7

If you need to block it on-the-fly instead of just all the time, you can hook Ham_Weapon_PrimaryAttack and return HAM_SUPERCEDE if the player isn't able to throw.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
01101101
BANNED
Join Date: Nov 2009
Location: 9`su 09`n0n7e`r0f76a
Old 01-23-2010 , 02:02   Re: Block nade throwing.
Reply With Quote #8

Quote:
Originally Posted by Exolent[jNr] View Post
If you need to block it on-the-fly instead of just all the time, you can hook Ham_Weapon_PrimaryAttack and return HAM_SUPERCEDE if the player isn't able to throw.
Nice, thats what i've been looking for
01101101 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 19:36.


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