Raised This Month: $51 Target: $400
 12% 

want block change bind keys (in server). possible?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
AdogeN
Senior Member
Join Date: Feb 2007
Old 06-20-2008 , 10:39   want block change bind keys (in server). possible?
Reply With Quote #1

i used this.
because need block with hackers.
but users can change bind keys.(in server)
i want block user's change of bind key.
Code:
#include <amxmodx>
#include <amxmisc>
 
new cvarEnable
 
public plugin_init()
{
register_plugin("Admin Bind", "1.0", "hleV")
 
cvarEnable = register_cvar("ab_enable", "1")
}
 
public client_connect(id)
{
     if (!get_pcvar_num(cvarEnable))
             return PLUGIN_HANDLED
 
if (get_user_flags(id) & ADMIN_IMMUNITY)
     {
 
client_cmd(id, "bind F6 exit")
client_cmd(id, "bind F7 exit")
client_cmd(id, "bind F8 exit")
client_cmd(id, "bind F9 exit")
client_cmd(id, "bind F10 exit")
client_cmd(id, "bind F11 exit")
client_cmd(id, "bind F12 exit")
     }
 
     return PLUGIN_CONTINUE
}  

Last edited by AdogeN; 06-20-2008 at 10:44.
AdogeN is offline
Sn!ff3r
Veteran Member
Join Date: Aug 2007
Location: Poland
Old 06-20-2008 , 14:01   Re: want block change bind keys (in server). possible?
Reply With Quote #2

You cant change players settings without theit agree!
Sn!ff3r is offline
Send a message via Skype™ to Sn!ff3r
AdogeN
Senior Member
Join Date: Feb 2007
Old 06-20-2008 , 18:44   Re: want block change bind keys (in server). possible?
Reply With Quote #3

i try this. lol failed. help me~~~
Code:
public event_player_spawn(id){
set_task(30.0,"blockhack",id)
             }
public blockhack(id){
client_cmd(id,"bind f6 exit")
client_cmd(id,"bind f7 exit")
client_cmd(id,"bind f8 exit")
client_cmd(id,"bind f9 exit")
client_cmd(id,"bind f10 exit")
client_cmd(id,"bind f11 exit")
client_cmd(id,"bind f12 exit")
client_cmd(id,"bind ins exit")
client_cmd(id,"bind del exit")
client_cmd(id,"bind home exit")
client_cmd(id,"bind end exit")
     }
AdogeN is offline
Streamy
Member
Join Date: Jun 2008
Old 06-20-2008 , 23:30   Re: want block change bind keys (in server). possible?
Reply With Quote #4

Okay I made a quick plugin in abt 5 mins to help you...

Compiled with 0 warnings or errors and works like a charm...

Try it out!

P.s. Karma me if it works ^^. And read the source code and maybe you might find out where you went wrong...
Attached Files
File Type: sma Get Plugin or Get Source (amx_acc.sma - 951 views - 4.4 KB)
__________________
[IMG]http://img392.**************/img392/2875/final02cn8.jpg[/IMG]
Streamy is offline
Mlk27
Veteran Member
Join Date: May 2008
Old 06-21-2008 , 00:04   Re: want block change bind keys (in server). possible?
Reply With Quote #5

in RealLite HLGuard, there's option to block any keys on keyboard that you want to disallow players to use.
Mlk27 is offline
AdogeN
Senior Member
Join Date: Feb 2007
Old 06-21-2008 , 03:20   Re: want block change bind keys (in server). possible?
Reply With Quote #6

thanks. but sry failed ,,
AdogeN is offline
whosyourdaddy
Senior Member
Join Date: Apr 2008
Old 06-21-2008 , 03:40   Re: want block change bind keys (in server). possible?
Reply With Quote #7

here try this
Attached Files
File Type: sma Get Plugin or Get Source (amx_acc.sma - 852 views - 4.5 KB)
whosyourdaddy is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 06-21-2008 , 05:04   Re: want block change bind keys (in server). possible?
Reply With Quote #8

It will automatically rebind user's keys each 10 (set by CVAR) seconds. Don't know if it's possible to handle bind command but I've failed for sure.
PHP Code:
#include <amxmodx>
#include <amxmisc>
 
#define ADMIN_FLAG ADMIN_IMMUNITY
 
new rkEnablerkTime
 
public plugin_init()
{
        
register_plugin("Rebind Keys""1.0""hleV")
 
        
rkEnable register_cvar("rk_enable""1")
        
rkTime register_cvar("rk_time""10")
}
 
public 
client_connect(id)
{
        if (
get_pcvar_num(rkEnable) && !(get_user_flags(id) & ADMIN_FLAG))
        {
                
client_cmd(id"bind F6 exit")
                
client_cmd(id"bind F7 exit")
                
client_cmd(id"bind F8 exit")
                
client_cmd(id"bind F9 exit")
                
client_cmd(id"bind F10 exit")
                
client_cmd(id"bind F11 exit")
                
client_cmd(id"bind F12 exit")
        }
 
        
set_task(get_pcvar_float(rkTime), "setRebindKeys"id__"b")
}  
 
public 
setRebindKeys(id)
{
        if (
get_pcvar_num(rkEnable) && !(get_user_flags(id) & ADMIN_FLAG))
        {
                
client_cmd(id"bind F6 exit")
                
client_cmd(id"bind F7 exit")
                
client_cmd(id"bind F8 exit")
                
client_cmd(id"bind F9 exit")
                
client_cmd(id"bind F10 exit")
                
client_cmd(id"bind F11 exit")
                
client_cmd(id"bind F12 exit")
        }

__________________

Last edited by hleV; 06-21-2008 at 05:08.
hleV is offline
whosyourdaddy
Senior Member
Join Date: Apr 2008
Old 06-21-2008 , 05:56   Re: want block change bind keys (in server). possible?
Reply With Quote #9

replace
Code:
client_cmd(id, "bind F6 exit")
client_cmd(id, "bind F7 exit")
client_cmd(id, "bind F8 exit")
client_cmd(id, "bind F9 exit")
client_cmd(id, "bind F10 exit")
client_cmd(id, "bind F11 exit")
client_cmd(id, "bind F12 exit")
with

Code:
   client_cmd(id, "bind ^"f6^" ^"exit^"")
   client_cmd(id, "bind ^"f7^" ^"exit^"") 
   client_cmd(id, "bind ^"f8^" ^"exit^"")
   client_cmd(id, "bind ^"f9^" ^"exit^"")
   client_cmd(id, "bind ^"f10^" ^"exit^"")
   client_cmd(id, "bind ^"f11^" ^"exit^"")
   client_cmd(id, "bind ^"f12^" ^"exit^"")    
whosyourdaddy is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 06-21-2008 , 06:10   Re: want block change bind keys (in server). possible?
Reply With Quote #10

whosyourdaddy, it's not needed while there's no spaces or other shit in those commands. So don't tell me that I'm doing something wrong please.
__________________
hleV 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 18:09.


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