Raised This Month: $ Target: $400
 0% 

Block "+use" command


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DragosHh
Junior Member
Join Date: Jul 2008
Old 06-18-2010 , 04:40   Block "+use" command
Reply With Quote #1

Hello guys!
I'm trying to make a plugin wich block the "+use" command or detect the use key pressing, and block the command.

Until now i did this, but doesn't block the "+use" command.

Code:
#include <amxmodx>
#include <amxmisc>

public plugin_init() {
    register_plugin("Block use cmd", "1.0", "DragosHh")
    register_clcmd("+use", "block_cmd")
}


public block_cmd(id) {
    client_print(id,print_center,"U cannot use the use key!")
    return PLUGIN_HANDLED
}
--------------
Thanks in advance and sorry for my bad English.
DragosHh is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 06-18-2010 , 05:50   Re: Block "+use" command
Reply With Quote #2

You can't hook original + commands like +use, +attack,... with register_clcmd()

Try to use Ham_Use
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 06-18-2010 , 06:44   Re: Block "+use" command
Reply With Quote #3

Search.
__________________
hleV is offline
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 06-18-2010 , 10:33   Re: Block "+use" command
Reply With Quote #4

Hook FM_CmdStart and then check if user has pressed IN_USE key...if so then return FMRES_SUPERCEDE to block it..
__________________

My Plugins For ZP

Inactive due to College and Studies
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype™ to abdul-rehman
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 06-18-2010 , 11:08   Re: Block "+use" command
Reply With Quote #5

Code:
new Buttons = get_uc( uc, UC_Buttons ) if( Buttons & IN_USE ) {     Buttons &= ~IN_USE     set_uc( uc, UC_Buttons, Buttons ) }
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
kikifrh
Senior Member
Join Date: May 2009
Old 06-18-2010 , 14:38   Re: Block "+use" command
Reply With Quote #6

try putting this plugin in the top of plugins.ini
kikifrh is offline
Old 06-18-2010, 15:56
Kreation
This message has been deleted by Kreation. Reason: nvm
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 06-18-2010 , 16:02   Re: Block "+use" command
Reply With Quote #8

Quote:
Originally Posted by kikifrh View Post
try putting this plugin in the top of plugins.ini
it won't make any difference because you can't hook +use like that
__________________
xPaw 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 14:57.


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