Hello, i don't really understand what you want the code to do, but there is surely a big error in the code.
it's called "Plugin" not "Plagin" so the main is not executed. it should be:
also in the last part of the code you're checking for every players, starting from index 18 (which should be 1) if the player is alive, if that's true you read the team he is into and try to compare it, which i guess it's not what you want.
instead i think you want to use this:
Quote:
ChangeClientTeam(client, team);
|
the indexes for the teams are here:
Quote:
Team indexes:
1 = Spectate
2 = RED / Terrorists
3 = BLU / Counter-Terrorists
|
hence it would look like:
Quote:
if (IsPlayerAlive(i))
{
ChangeClientTeam(i, 1);
}
|
i hope that helps
__________________