Raised This Month: $ Target: $400
 0% 

Block throw weapon


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Diegorkable
Veteran Member
Join Date: Jun 2011
Old 06-14-2012 , 09:43   Block throw weapon
Reply With Quote #1

How can I use FM_SetModel forward to check if player threw an M4 and block it? (Keep the M4 in his hand)?
__________________
My Projects:

Auto-Mix (Pug): 100%

Joined the Military (a soldier now) - Inactive
Diegorkable is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-14-2012 , 09:46   Re: Block throw weapon
Reply With Quote #2

Hook "drop" command and block it if player is holding M4.
Also, hook client buy and block it if player has an M4 and is buying a primary weapon.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 06-14-2012 , 13:20   Re: Block throw weapon
Reply With Quote #3

You should also block "drop weapon_m4a1"
Backstabnoob is offline
Diegorkable
Veteran Member
Join Date: Jun 2011
Old 06-14-2012 , 13:32  
Reply With Quote #4

Thank you.

By the way, if I want to log everything that player types in console, weither its in chat or in console.
Will register_clcmd("", "logAll") cover it up? Or is there any other special way?
__________________
My Projects:

Auto-Mix (Pug): 100%

Joined the Military (a soldier now) - Inactive

Last edited by Exolent[jNr]; 06-15-2012 at 11:47.
Diegorkable is offline
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 06-14-2012 , 13:46   Re: Block throw weapon
Reply With Quote #5

You cannot do that.
Backstabnoob is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-14-2012 , 13:58   Re: Block throw weapon
Reply With Quote #6

You can use client_command() forward for most commands, but you can't just get anything the player types.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-14-2012 , 15:47   Re: Block throw weapon
Reply With Quote #7

PHP Code:
    RegisterHam(Ham_CS_Item_CanDrop"weapon_m4a1""CM4A1_CanDrop")
}

public 
CM4A1_CanDrop/* iM4a1 */ )
{
    
SetHamReturnIntegerfalse )
    return 
HAM_SUPERCEDE

__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-14-2012 , 15:49   Re: Block throw weapon
Reply With Quote #8

Quote:
Originally Posted by ConnorMcLeod View Post
PHP Code:
    RegisterHam(Ham_CS_Item_CanDrop"weapon_m4a1""CM4A1_CanDrop")
}

public 
CM4A1_CanDrop/* iM4a1 */ )
{
    
SetHamReturnIntegerfalse )
    return 
HAM_SUPERCEDE

That work for buying a new primary which would force the m4a1 to drop?
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-14-2012 , 16:36   Re: Block throw weapon
Reply With Quote #9

I don't think so because when you enable nades drop with this way you can still buy different nades types, but not sure at all, the easier is to test.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Old 06-14-2012, 18:01
Arkshine
This message has been deleted by Arkshine. Reason: nvm
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-14-2012 , 22:47   Re: Block throw weapon
Reply With Quote #10

Quote:
Originally Posted by Diegorkable View Post
By the way, if I want to log everything that player types in console, weither its in chat or in console.
Will register_clcmd("", "logAll") cover it up? Or is there any other special way?
Are you missing the edit button? Maybe we need to get that fixed for you . . .
__________________
fysiks is offline
Reply


Thread Tools
Display Modes

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 06:09.


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