ServeurLibre uniquement à la toute fin

This commit is contained in:
rick 2021-05-20 01:26:13 +02:00
parent 1c093e3c39
commit e812acaba2
Signed by: Rick
GPG key ID: 2B593F087240EE99

View file

@ -6,7 +6,7 @@
#define MY_SOCKET_IP "localhost"
//#define MY_SOCKET_IP "127.0.0.1"
#define MY_SOCKET_PORT 3500
#define MY_SOCKET_PORT 300
#define STEAMID_LENGTH 128
char teamCT[6][150];
@ -28,7 +28,7 @@ public Plugin myinfo =
public void OnPluginStart()
{
HookEvent("cs_win_panel_match", ServeurLibre);
//HookEvent("cs_win_panel_match", ServeurLibre);
HookEvent("player_activate", SetTeamPlayer);
HookEvent("cs_win_panel_round", UpdateScoreBoard);
@ -124,11 +124,13 @@ public Action SetTeam(int args)
public void OnMapEnd()
{
// TODO kick tout le monde
PrintToServer("======= FIN ======");
ServeurLibre();
/* kick tout le monde */
}
public void ServeurLibre(Event event, const char[] name, bool dontBroadcast)
public void ServeurLibre()
{
// requete post pour match fini et serveur libre
Handle socket = SocketCreate(SOCKET_TCP, OnSocketError);