|
Author
|
Message
|
|
Junior Member
|

05-21-2013
, 05:06
help with say cmd
|
#1
|
Hi guys i want a say cmd .setpass "password" to set sv_password "password". I try to make it with this code but it isn work when i write .setpass 32 but when i write .setpass and it dont set any password because i dont give one.
Quote:
/* Say cmd .Setpass ...*/
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#define PLUGIN ".setpass"
#define VERSION "1.0"
#define AUTHOR "Nefos"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say","set_pass")
}
public set_pass(id) {
if(has_flag(id, "v"))
{
new password[32], setpass[32]
read_args(setpass,31)
remove_quotes(setpass)
if (equali(setpass, ".setpass ", 11))
{
read_argv(2, password, 32)
server_cmd("sv_password %s",password)
client_print(0, print_chat,"[AMXX] PASSWORD SETTED")
}
}
else {
client_print(0,print_chat,"NO ACCESS")
return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
}
|
|
|
|
|