Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Psykotikism authored Jun 16, 2018
1 parent cb93c87 commit 844f2a0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Version 5.5 (June 16, 2018)

1. Bug fixes:

- Fixed the nff_enabledgamemodes and nff_disabledgamemodes convars not working properly.

## Version 5.0 (June 10, 2018)

1. Major code optimization.
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ nff_enabledgamemodes ""
You must specify the game modes in the nff_enabledgamemodes and nff_disabledgamemodes convars.

Here are some scenarios and their outcomes:

- Scenario 1
```
nff_enabledgamemodes "" // The plugin is enabled in all game modes.
Expand Down
Binary file modified addons/sourcemod/plugins/no_friendly-fire.smx
Binary file not shown.
16 changes: 4 additions & 12 deletions addons/sourcemod/scripting/no_friendly-fire.sp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <sdktools>
#pragma semicolon 1
#pragma newdecls required
#define NFF_VERSION "5.0"
#define NFF_VERSION "5.5"

public Plugin myinfo =
{
Expand Down Expand Up @@ -99,11 +99,7 @@ stock bool bIsSystemValid()
ExplodeString(sConVarModes, ",", sModeName, sizeof(sModeName), sizeof(sModeName[]));
for (int iMode = 0; iMode < sizeof(sModeName); iMode++)
{
if (StrContains(sGameMode, sModeName[iMode], false) == -1 && sModeName[iMode][0] != '\0')
{
return false;
}
else
if (StrContains(sGameMode, sModeName[iMode], false) != -1 && sModeName[iMode][0] != '\0')
{
return true;
}
Expand All @@ -112,14 +108,10 @@ stock bool bIsSystemValid()
ExplodeString(sConVarModes, ",", sModeName, sizeof(sModeName), sizeof(sModeName[]));
for (int iMode = 0; iMode < sizeof(sModeName); iMode++)
{
if (StrContains(sGameMode, sModeName[iMode], false) != -1 && sModeName[iMode][0] != '\0')
{
return false;
}
else
if (StrContains(sGameMode, sModeName[iMode], false) == -1 && sModeName[iMode][0] != '\0')
{
return true;
}
}
return true;
return false;
}

0 comments on commit 844f2a0

Please sign in to comment.