Test event fin map

This commit is contained in:
rick 2021-05-29 01:54:09 +02:00
parent ad205b7f58
commit b3cd6f9ee5
Signed by: Rick
GPG key ID: 2B593F087240EE99

View file

@ -32,6 +32,7 @@ public void OnPluginStart()
{
HookEvent("player_activate", SetTeamPlayer);
HookEvent("cs_win_panel_round", UpdateScoreBoard);
HookEvent("cs_match_end_restart", TestRestart);
RegServerCmd("!team", SetTeam);
/* pour le debug
@ -42,6 +43,25 @@ public void OnPluginStart()
PrintToServer("Hello world!");
}
public void TestRestart(Event event, const char[] name, bool dontBroadcast)
{
// TODO kick tout le monde
PrintToServer("======= FIN ======");
for (int i = 0; i < nbAllId; i++)
{
PrintToServer("On kick %d.", allId[i]);
if (IsClientInGame(allId[i])) {
PrintToServer("NUUUUUUUL");
KickClient(allId[i], "Le match est fini.");
}
allId[i] = 0;
}
ServeurLibre();
nbAllId = 0;
/* kick tout le monde */
}
public void OnConfigsExecuted()
{
if (port < 0)