Patch kick joueur

This commit is contained in:
rick 2021-05-29 01:32:48 +02:00
parent 8ecbfdc285
commit 26e1d1dd8b
Signed by: Rick
GPG key ID: 2B593F087240EE99

View file

@ -24,7 +24,7 @@ public Plugin myinfo =
description = "Bot communiquant avec le bot discord \
https://github.com/Lunki51/cs-picker afin dautomatiser \
lInfoLan 2021",
version = "1.5",
version = "1.5.1",
url = "https://git.gnous.eu/Rick/infolanBot"
};
@ -139,19 +139,25 @@ public void OnMapEnd()
PrintToServer("======= FIN ======");
for (int i = 0; i < nbAllId; i++)
{
PrintToServer("On kick %d.", allId[i]);
if (IsClientInGame(allId[i]))
KickClient(allId[i], "Le match est fini.");
allId[i] = 0;
}
ServeurLibre();
nbAllId = 0;
/* kick tout le monde */
}
public void ServeurLibre()
{
/*
for (int i = 0; i < sizeof(teamCT); i++)
{
teamCT[i] = "";
teamT[i] = "";
}
*/
// requete post pour match fini et serveur libre
Handle socket = SocketCreate(SOCKET_TCP, OnSocketError);
SocketConnect(socket, SocketEnvoieVictoire, OnSocketReceive, OnSocketDisconnected, MY_SOCKET_IP, MY_SOCKET_PORT);