Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Valid client check fix and multiple ice blocks fix #53

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions addons/sourcemod/scripting/myjailshop_icegrenade.sp
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ public Action Event_FlashFlashDetonate(Event event, const char[] name, bool dont
for (int i = 1; i <= MaxClients; i++)
{
// Check that client is a real player who is alive and is a CT
if (IsValidClient(i, true, true))
if (IsValidClient(i, true, false))
{
if (!gc_bItemAffectTeam.BoolValue && GetClientTeam(i) == CS_TEAM_T)
continue;
Expand All @@ -219,6 +219,9 @@ public Action Event_FlashFlashDetonate(Event event, const char[] name, bool dont

if (RoundToFloor(gc_fItemRadius.FloatValue - (distance / 2.0)) <= 0) // distance to ground zero
continue;

if (g_iIceEntity[i] > 0)
continue;

g_iIceEntity[i] = CreateEntityByName("prop_dynamic_override");

Expand Down Expand Up @@ -273,4 +276,4 @@ public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max
gF_hOnPlayerBuyItem = CreateGlobalForward("MyJailShop_OnPlayerBuyItem", ET_Ignore, Param_Cell, Param_String);

return APLRes_Success;
}
}