Test event fin map
This commit is contained in:
parent
ad205b7f58
commit
b3cd6f9ee5
1 changed files with 20 additions and 0 deletions
20
infolan.sp
20
infolan.sp
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue