#include <amxmodx>
#include <amxmisc>
public plugin_init()
{
register_plugin("transfer player", "1.0", "Rulzy");
register_concmd("amx_transfer", "cmdTransfer", ADMIN_LEVEL_A, "<#userid|username|@all> <server_ip> <server_port> - transfer player(s) to another server.");
}
public cmdTransfer(id, level, cid)
{
if(!cmd_access(id, level, cid, 4))
return PLUGIN_HANDLED;
new target, serverip, serverport, serverpassword={0};
read_argv(1, target, 31);
read_argv(2, serverip, 31);
read_argv(3, serverport, 7);
read_argv(4, serverpassword, 31);
if(equal(target, "@all"))
{
new maxplayers = get_maxplayers();
for(new i=1;i<=maxplayers;i++)
{
if(is_user_connecting(i) || is_user_connected(i))
{
if(serverpassword)
client_cmd(i, "password ^"%s^"; connect %s:%s", serverpassword, serverip, serverport);
else
client_cmd(i, "connect %s:%s", serverip, serverport);
}
}
}
new player = cmd_target(id, target, 11);
if(!player) return PLUGIN_HANDLED;
if(serverpassword)
client_cmd(player, "password ^"%s^"; connect %s:%s", serverpassword, serverip, serverport);
else
client_cmd(player, "connect %s:%s", serverip, serverport);
return PLUGIN_HANDLED;
}未测试,请自行测试。 我感觉r版主很厉害哈,并且很热心啊。。。现在像这样的人已经很少了。。。 R版主就是好人
页:
[1]