Quote:
Originally Posted by Dark Kingdom
PHP Code:
register_clcmd("say /changemap", "map_change");
|
Well that's not gonna help him...
Code:
public change_map(id)
{
new arg[34]
read_argv(1,arg,32)
if(equali(arg,"")) {
// Do stuff, if needed.
return PLUGIN_HANDLED
}
new mapname[35]
formatex(mapname,34,"%s",arg)
server_cmd(mapname);
return PLUGIN_HANDLED
}
This will obviously allow anyone to use the command, and I don't think it's needed to format the "mapname" string, but whatever.
__________________