Here's the Code:
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#define PLUGIN "Test"
#define VERSION "1.0"
#define AUTHOR "Epic"
new StoredP
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /store", "Store")
register_clcmd("say /move", "Move")
}
public Store(id)
{
static Players[32], Pnum;
get_players(Players, Pnum, "ae", "TERRORIST")
for(new i = 0; i < Pnum; i++)
{
StoredP = Players[i]
cs_set_user_team(StoredP, CS_TEAM_CT)
client_print(StoredP, print_chat, "[AMXX] T's stored")
}
}
public Move(id)
{
if(is_user_connected(StoredP))
{
cs_set_user_team(StoredP, CS_TEAM_T)
}
}
Quote:
Trying to do:
Store all the terrorist in the global var and move them to CT and then move them back to T.
|
Quote:
Whats Happening:
Store's all the terrorists in the global var and moves them all to CT and only moves the last terrorist stored back to T.
|
Do i have to use a 2d array for this?
any help would be appreciated