diff --git a/addons/sourcemod/plugins/cmenu.smx b/addons/sourcemod/plugins/cmenu.smx index 7f809fc..40fad82 100644 Binary files a/addons/sourcemod/plugins/cmenu.smx and b/addons/sourcemod/plugins/cmenu.smx differ diff --git a/addons/sourcemod/scripting/cmenu.sp b/addons/sourcemod/scripting/cmenu.sp index e51e02a..1b2ce1d 100644 --- a/addons/sourcemod/scripting/cmenu.sp +++ b/addons/sourcemod/scripting/cmenu.sp @@ -19,7 +19,7 @@ #include #undef REQUIRE_PLUGIN -#define VERSION "1.2.3 (006)" +#define VERSION "1.2.3 (009)" #define CHOICE1 "#choice1" #define CHOICE2 "#choice2" @@ -155,6 +155,13 @@ public OnPluginStart() { public void OnClientPutInServer(int client) { SDKHook(client, SDKHook_OnTakeDamageAlive, OnTakeDamageAlive); } +public void OnClientDisconnect(int client) { + if(IsHnsActive()) { + if(GetClientTeam(client) == CS_TEAM_T && IsClientInGame(client) && IsPlayerAlive(client)) { + aliveTerrorists--; + } + } +} public void OnPlayerDeath(Event event, const char[] name, bool dontBroadcast) { int client = GetClientOfUserId(GetEventInt(event, "userid")); @@ -347,6 +354,7 @@ public int WardenMenuHandler(Menu menu, MenuAction action, int client, int param { char info[32]; menu.GetItem(param2, info, sizeof(info)); + openMenu(client); if(StrEqual(info, CHOICE1)) { openWeaponsMenu(client); } @@ -446,7 +454,7 @@ public int playerFreedayHandler(Menu menu, MenuAction action, int client, int pa } case MenuAction_Select: { - + playerFreeday(client); char info[MAX_NAME_LENGTH]; if(menu.GetItem(param2, info, sizeof(info))) { int target = GetClientOfUserId(StringToInt(info)); @@ -461,6 +469,7 @@ public int playerFreedayHandler(Menu menu, MenuAction action, int client, int pa } + } case MenuAction_End: { @@ -531,6 +540,7 @@ public int DaysMenuHandler(Menu menu, MenuAction action, int client, int param2) { char info[32]; menu.GetItem(param2, info, sizeof(info)); + if(!IsGameActive) { if(StrEqual(info, CHOICE1)) { initFreeday(client); @@ -754,6 +764,7 @@ public int weaponsMenuHandler(Menu menu, MenuAction action, int client, int para { char info[32]; menu.GetItem(param2, info, sizeof(info)); + openWeaponsMenu(client); if(StrEqual(info, CHOICE1)) { if(IsClientInGame(client)) {