PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "alonelive"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("HLTV", "SpecSpawn", "a", "1=0", "2=0") // catch the round start moment
// Add your code here...
}
public SpecSpawn() {
new players[32], inum
get_players(players, inum)
for (new i = 0; i < inum; ++i) { // for all..
if(is_user_connected(i)) // connected..
if(cs_get_user_team(i) == CS_TEAM_SPECTATOR) // spectator players
// cs_set_user_team(i, AUTO) ??
// engclient_cmd(id, joinclass, 5) ??
// need to spawn spect. player to T or CT (random) team with random model..
ExecuteHamB(Ham_Spawn,i)
}
}
Can anyone help me with this?
__________________