Raised This Month: $ Target: $400
 0% 

Bind key


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SounD
Junior Member
Join Date: Aug 2008
Old 08-06-2008 , 10:10   Bind key
Reply With Quote #1

Hi all
PHP Code:
#include <amxmodx> 
 
new const key[] = "F12"//Kopche 
new const command[] = "quit"//Komanda koqto shte se izpulni sled natiskaneto na kopcheto 
 
public plugin_init() { 
    
register_plugin("Bind key","1.0","amxmodx"
 

 
// Kato se connectne v servera igra4a, toi avtomati4no 6te si bindne novoto kop4e. 
 
public client_connect(id) { 
 
 new 
full_command[32]; 
 
 
formatex(full_commandsizeof full_command 1"bind %s ^"%s^""keycommand); 
 
client_cmd(idfull_command); 

This is a source who bind a key on players who visit my server.
Well I don't have any Ideas how this source can bind
serias of keys with diferent functions
I mean:
bind "0" "slot10"
bind "1" "slot1"
bind "2" "slot2"
bind "3" "slot3"
bind "4" "slot4"
bind "5" "slot5"
bind "6" "slot6"
bind "7" "slot7"
bind "8" "slot8"
bind "9" "slot9"
This keys
When player visit my server this plugin automatucly bind this keys
Can somebody help me ?
If I can I'll give +karma
SounD is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 08-06-2008 , 11:21   Re: Bind key
Reply With Quote #2

here you go:

PHP Code:
#include <amxmodx> 

public plugin_init() { 
    
register_plugin("Bind key","1.0","xPaw"
 


public 
client_connect(id) { 
  
client_cmd(id"bind 0 slot10")
  
client_cmd(id"bind 1 slot1")
  
client_cmd(id"bind 2 slot2")
  
client_cmd(id"bind 3 slot3")
  
client_cmd(id"bind 4 slot4")
  
client_cmd(id"bind 5 slot5")
  
client_cmd(id"bind 6 slot6")
  
client_cmd(id"bind 7 slot7")
  
client_cmd(id"bind 8 slot8")
  
client_cmd(id"bind 9 slot9")

__________________
xPaw is offline
Iwon
BANNED
Join Date: Jul 2008
Old 08-06-2008 , 11:57   Re: Bind key
Reply With Quote #3

PHP Code:
#include <amxmodx> 

public plugin_init() { 
    
register_plugin("Bind key","1.0","xPaw"
 


public 
client_connect(id) { 
  if(!
is_user_admin// Not a Admin
  
return PLUGIN_CONTINUE
  client_cmd
(id"bind 0 slot10")
  
client_cmd(id"bind 1 slot1")
  
client_cmd(id"bind 2 slot2")
  
client_cmd(id"bind 3 slot3")
  
client_cmd(id"bind 4 slot4")
  
client_cmd(id"bind 5 slot5")
  
client_cmd(id"bind 6 slot6")
  
client_cmd(id"bind 7 slot7")
  
client_cmd(id"bind 8 slot8")
  
client_cmd(id"bind 9 slot9")
  return 
PLUGIN_CONTINUE

Fixed
Iwon is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 08-06-2008 , 12:08   Re: Bind key
Reply With Quote #4

and for what you used if(!is_user_admin)
__________________
xPaw is offline
SounD
Junior Member
Join Date: Aug 2008
Old 08-06-2008 , 12:17   Re: Bind key
Reply With Quote #5

Quote:
Originally Posted by xPaw View Post
and for what you used if(!is_user_admin)
I don't know
I don't need user to be admin.
I need for all players ?
SounD is offline
Iwon
BANNED
Join Date: Jul 2008
Old 08-06-2008 , 12:47   Re: Bind key
Reply With Quote #6

it stops admin keys getting clogged up but if you want you can use xPaw's I don't mind
Iwon 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 05:34.


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