Looks like I've registered the logevent incorrectly. It has 3 arguments.
Code:
#include <amxmodx>
#include <hamsandwich>
new FirstJoin[33];
public plugin_init()
register_logevent("JoinedTeam", 3, "1=joined team");
public client_connect(Client)
FirstJoin[Client] = true;
public JoinedTeam()
{
new LogUser[80], Name[32];
read_logargv(0, LogUser, 79);
parse_loguser(LogUser, Name, 31);
new Client = get_user_index(Name);
if (FirstJoin[Client] && !is_user_alive(Client) && 1 <= get_user_team(Client) < 3)
{
FirstJoin[Client] = false;
set_task(1.0, "RespawnPlayer", Client);
}
}
public RespawnPlayer(Client)
ExecuteHamB(Ham_CS_RoundRespawn, Client);
__________________