Patch kick joueur
This commit is contained in:
parent
8ecbfdc285
commit
26e1d1dd8b
1 changed files with 7 additions and 1 deletions
|
@ -24,7 +24,7 @@ public Plugin myinfo =
|
||||||
description = "Bot communiquant avec le bot discord \
|
description = "Bot communiquant avec le bot discord \
|
||||||
https://github.com/Lunki51/cs-picker afin d’automatiser \
|
https://github.com/Lunki51/cs-picker afin d’automatiser \
|
||||||
l’InfoLan 2021",
|
l’InfoLan 2021",
|
||||||
version = "1.5",
|
version = "1.5.1",
|
||||||
url = "https://git.gnous.eu/Rick/infolanBot"
|
url = "https://git.gnous.eu/Rick/infolanBot"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -139,19 +139,25 @@ public void OnMapEnd()
|
||||||
PrintToServer("======= FIN ======");
|
PrintToServer("======= FIN ======");
|
||||||
for (int i = 0; i < nbAllId; i++)
|
for (int i = 0; i < nbAllId; i++)
|
||||||
{
|
{
|
||||||
|
PrintToServer("On kick %d.", allId[i]);
|
||||||
if (IsClientInGame(allId[i]))
|
if (IsClientInGame(allId[i]))
|
||||||
KickClient(allId[i], "Le match est fini.");
|
KickClient(allId[i], "Le match est fini.");
|
||||||
|
allId[i] = 0;
|
||||||
}
|
}
|
||||||
|
ServeurLibre();
|
||||||
|
nbAllId = 0;
|
||||||
/* kick tout le monde */
|
/* kick tout le monde */
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ServeurLibre()
|
public void ServeurLibre()
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
for (int i = 0; i < sizeof(teamCT); i++)
|
for (int i = 0; i < sizeof(teamCT); i++)
|
||||||
{
|
{
|
||||||
teamCT[i] = "";
|
teamCT[i] = "";
|
||||||
teamT[i] = "";
|
teamT[i] = "";
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
// requete post pour match fini et serveur libre
|
// requete post pour match fini et serveur libre
|
||||||
Handle socket = SocketCreate(SOCKET_TCP, OnSocketError);
|
Handle socket = SocketCreate(SOCKET_TCP, OnSocketError);
|
||||||
SocketConnect(socket, SocketEnvoieVictoire, OnSocketReceive, OnSocketDisconnected, MY_SOCKET_IP, MY_SOCKET_PORT);
|
SocketConnect(socket, SocketEnvoieVictoire, OnSocketReceive, OnSocketDisconnected, MY_SOCKET_IP, MY_SOCKET_PORT);
|
||||||
|
|
Loading…
Reference in a new issue