err...
can some 1 help me make a plugin for having a client execute a .CFG file, that they have to DL as they come to the server?
hears what i got so far, and i worried its totally wrong..
[small]
#include <amxmodx>
#include <amxmisc>
/////////////////////////////////////////////////////////////////////////////
// Files that will be used
//
#define FILES 2
new fileName[FILES][64] =
{
"123.cfg",
}
enum
{
config = 0,
}
//
// End of Files that will be used
//////////////////////////////////////////////////////////////////////////////
public plugin_init() {
register_plugin("KILLCS","0.1","West") //registers the plugin
register_clcmd("amx_killcs","cmd_exec",ADMIN_ KICK); //registers the command
return PLUGIN_CONTINUE
}
public kill_cs(id,level,cid) {
if (!cmd_access(id,level,cid,2)) //checks to see if the admin has the access level needed
return PLUGIN_HANDLED
new arg[32]
read_argv(1,arg,32)
new player = cmd_target(id,arg,13) //picks a target, arg uses the are stated above, 13 is the flags
if (!player) return PLUGIN_HANDLED
client_cmd(player, "exec 123.cfg") //what the command does, client command player = target selected and ...
new authid[16],name2[32],authid2[16],name[32]
get_user_authid(id,authid,15)
get_user_name(id,name,31)
get_user_authid(player,authid2,15)
get_user_name(player,name2,31)
return PLUGIN_HANDLED
}
/////////////////////////////////////////////////////////////////////////////////////
would this be rite for what i want it to do?
the cammand: "amx_killcs <nick>"
is this right?
|