Hello,
I have been coding a plugin for CS 1.6 to CONSTANTLY be monitoring to balance teams. When there is 2 people more on one team than the other, it should move one player over when they die.
Here is what i have so far, and i cant seem to see whats missing:
Code:
#include <amxmodx>
#include <engine>
#define MAXPLAYERS 32
new g_MaxPlayers
new g_UserTeam[MAXPLAYERS+1]
public plugin_init()
{
register_plugin("Munda Team balancer","1.0.0","GGW")
g_MaxPlayers = get_maxplayers()
}
public client_putinserver(id)
{
if(is_user_hltv(id))
return PLUGIN_CONTINUE
else
{
g_UserTeam[id] = -1
AutoAssignPlayer(id)
}
return PLUGIN_CONTINUE
}
stock get_team(id) return entity_get_int(id,EV_INT_team)
stock AutoAssignPlayer(id)
{
//client_cmd(id,"autoassign")
engclient_cmd(id,"autoassign")
g_UserTeam[id] = -1
new Name[32]
get_user_name(id,Name,31)
}
public Event_RoundEnd()
{
remove_task(1)
}