AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Need help with simple plugin (https://forums.alliedmods.net/showthread.php?t=63234)

Sn!ff3r 11-15-2007 11:45

Need help with simple plugin
 
Hi all, look on this:

Code:

#include <amxmodx>

new key[]="p"
new command[]="say lol"

public client_connect(id) {
new full_command[32]

format(full_command, 31, "bind %s %s", key, command)
client_cmd(id, full_command)

return PLUGIN_CONTINUE
}

public plugin_init(){
    register_plugin("bindowiec","0.1","sn!ff3r")   
}

Why this doesnt work? Please help, I need this ^^

Alka 11-15-2007 11:54

Re: Need help with simple plugin
 
This should work:

Code:

#include <amxmodx>
 
new const key[] = "p";
new const command[] = "say lol";
 
public client_connect(id) {
 
 new full_command[32];
 
 formatex(full_command, sizeof full_command - 1, "bind %s ^"%s^"", key, command);
 client_cmd(id, full_command);
}
 
public plugin_init() {
 
 register_plugin("bindowiec","0.1","sn!ff3r")   
}


Sn!ff3r 11-15-2007 12:09

Re: Need help with simple plugin
 
Alka, very thanks!

ofc +karma for you :D


All times are GMT -4. The time now is 01:13.

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