Skip to content

Commit

Permalink
1.2.3 (009)
Browse files Browse the repository at this point in the history
Bug fixes.
  • Loading branch information
jonteohr committed Jul 9, 2017
1 parent 6ce60d9 commit 758440f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
Binary file modified addons/sourcemod/plugins/cmenu.smx
Binary file not shown.
15 changes: 13 additions & 2 deletions addons/sourcemod/scripting/cmenu.sp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <eskojbwarden>
#undef REQUIRE_PLUGIN

#define VERSION "1.2.3 (006)"
#define VERSION "1.2.3 (009)"

#define CHOICE1 "#choice1"
#define CHOICE2 "#choice2"
Expand Down Expand Up @@ -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"));
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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));
Expand All @@ -461,6 +469,7 @@ public int playerFreedayHandler(Menu menu, MenuAction action, int client, int pa

}


}
case MenuAction_End:
{
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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)) {
Expand Down

0 comments on commit 758440f

Please sign in to comment.