Skip to content

Commit

Permalink
让sv_steamgroup里的组成员不受hosts广告影响(原组被污染)
Browse files Browse the repository at this point in the history
  • Loading branch information
fantasylidong committed Apr 5, 2024
1 parent e9bc7f0 commit 24a7e22
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Binary file modified addons/sourcemod/plugins/extend/veterans.smx
Binary file not shown.
11 changes: 8 additions & 3 deletions addons/sourcemod/scripting/extend/veterans.sp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ new Handle:g_cvAPIkey;
public Plugin:myinfo =
{
name = "VeteransOnly",
author = "Soroush Falahati",
author = "Soroush Falahati, 东",
description = "Kicks the players without enough playtime in the game",
version = PLUGIN_VERSION,
url = "https://falahati.net/"
Expand Down Expand Up @@ -146,12 +146,15 @@ public OnPluginStart()
"Should we exclude players that are members of our Steam group?",
FCVAR_NONE, true, 0.0, true, 1.0
);
/*
cvar_groupID = CreateConVar(
"sm_veterans_groupid",
"25622692",
"",
"Steam Group ID (same as your sv_steamgroup)",
FCVAR_NONE
);
*/
cvar_groupID = FindConVar("sv_steamgroup");
cvar_banTime = CreateConVar(
"sm_veterans_bantime",
"10",
Expand Down Expand Up @@ -669,11 +672,13 @@ public void HTTPResponse_GetUserGroups(HTTPResponse response, int client)
dataObj = view_as<JSONObject>(jsonArray.Get(i));
GetConVarString(cvar_groupID, groupID, sizeof(groupID));
if ( dataObj.GetString("gid", keyname, sizeof(keyname))
&& strcmp(keyname, groupID) == 0 )
&& StrContains(groupID, keyname, false) != -1 )
{
//LogError("%s %s %d", groupID, keyname, StrContains(groupID, keyname, false) != -1);
player[client].isGroupMember = 1;
break;
}
//LogError("%s %s %d", groupID, keyname, StrContains(groupID, keyname, false) != -1);
}

delete jsonArray;
Expand Down
Binary file added addons/sourcemod/scripting/plugins/veterans.smx
Binary file not shown.

0 comments on commit 24a7e22

Please sign in to comment.