[amx] Search Just Really Cmd For Sawpteam

0SdZ0Gectou40SdZ0Gectou4 Join Date: 2003-05-28 Member: 16806Members
hello i search to make amx_swapteams plugin for Natural-sélection...
But is not corrects :

<!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
#include <amxmod>
#include <amxmisc>

public swap()
{
  new playersMR[32]
  new playersKH[32]
  new nbrMR,nbrKH
  get_players(playersMR,nbrMR,"e","Marins")
  get_players(playersKH,nbrKH,"e","Kharaa")
  for(new i = 0; i < nbrMR; i++) {
        engclient_cmd(playersMR[i], "readyroom")
        engclient_cmd(playersMR[i], "jointeamone")      
        }
  for(new i = 0; i < nbrKH; i++) {
        engclient_cmd(playersKH[i], "readyroom")
        engclient_cmd(playersKH[i], "jointeamtwo")
        }
  return PLUGIN_CONTINUE
}

public swap_teams(id,level,cid)
{
  if (!cmd_access(id,level,cid,1)) {
     return PLUGIN_HANDLED
  }
  client_print(0,print_chat,"* [AMX] Inversion des teams!...")
  set_cvar_string("round_end","0")
  set_cvar_string("mp_limitteams","0")
  set_cvar_string("mp_autoteambalance","0")
  set_cvar_float("sv_restart",3.0)
  set_task(2.0,"swap")
  return PLUGIN_CONTINUE
}

public plugin_init()
{
  register_plugin("AMX NS swap teams","1.0","Shromilder addapted by Gectou4 for ns")
  register_cvar("amx_ns_swapteams", "1.0",FCVAR_SERVER)
  register_concmd("amx_swapteams","swap_teams",ADMIN_LEVEL_A,"- Inverse les teams")
  return PLUGIN_CONTINUE
}
<!--c2--></td></tr></table><span class='postcolor'><!--ec2-->

i don't know if :
set_cvar_string("round_end","0")
set_cvar_string("mp_limitteams","0")
set_cvar_string("mp_autoteambalance","0")
set_cvar_float("sv_restart",3.0)

is good comand in Natural-Selection game
or/and if
engclient_cmd(playersMR[i], "readyroom")
engclient_cmd(playersMR[i], "jointeamone")

is corrects at NS 2.0

Thanks
Sign In or Register to comment.