update: changement de noms de variables

This commit is contained in:
rick 2021-06-03 14:48:57 +02:00
parent 80e3bffd56
commit 5bfc39ef9c
Signed by: Rick
GPG key ID: 2B593F087240EE99

View file

@ -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++;
}