diff --git a/infolan.sp b/infolan.sp
index 5a07e6f..0cadb85 100644
--- a/infolan.sp
+++ b/infolan.sp
@@ -8,12 +8,12 @@
#define MY_SOCKET_PORT 3000
#define STEAMID_LENGTH 128
-char teamCT[5][150];
-char teamT[5][150];
-char clientId[128];
+char teamCT[10][128];
+char teamT[10][128];
-int allId[20];
-int nbAllId = 0;
+/* liste de tous les clients connectés */
+int listClients[20];
+int nbClients = 0;
int port = -1;
@@ -75,14 +75,15 @@ public void OnConfigsExecuted()
//public void OnClientAuthorized(int client, const char[] auth)
public void SetTeamPlayer(Event event, const char[] name, bool dontBroadcast)
{
+ char clientId[128];
int client = GetClientOfUserId(event.GetInt("userid"));
GetClientAuthId(client, AuthId_Steam2, clientId, sizeof(clientId));
if (!strcmp(clientId, "BOT", true)) { return; }
if (FindAdminByIdentity("steam", clientId) != INVALID_ADMIN_ID)
{
ChangeClientTeam(client, CS_TEAM_SPECTATOR);
- allId[nbAllId] = client;
- nbAllId++;
+ listClients[nbClients] = client;
+ nbClients++;
}
else
{
@@ -97,15 +98,15 @@ public void SetTeamPlayer(Event event, const char[] name, bool dontBroadcast)
{
ChangeClientTeam(client, CS_TEAM_CT);
allGood = true;
- allId[nbAllId] = client;
- nbAllId++;
+ listClients[nbClients] = client;
+ nbClients++;
}
else if (!strcmp(teamT[i], clientId, false))
{
ChangeClientTeam(client, CS_TEAM_T);
allGood = true;
- allId[nbAllId] = client;
- nbAllId++;
+ listClients[nbClients] = client;
+ nbClients++;
}
i++;
}