-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
beta richochet fork #148
Closed
Closed
beta richochet fork #148
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
da06f01
Changes to stac.sp
RicochetYT 803d66f
More changes to stac.sp
RicochetYT 18cfa82
stac_client changes
RicochetYT 4fea5d7
Changes to stac_commands
RicochetYT e6eaa2a
Changes to stac_cvar_checks
RicochetYT 9c58957
Changes to stac_cvars
RicochetYT d14f90a
Changes to stac_globals
RicochetYT 06c5c9f
Changes to stac_mapchange
RicochetYT c442953
Changes to stac_misc_checks
RicochetYT 6c66e55
Changes to stac_onplayerruncmd
RicochetYT e42c8fc
Changes to stac_stocks
RicochetYT 209c907
Changes to stac.phrases
RicochetYT 5c0949a
Create sbp.games.txt
RicochetYT 3c630ee
Create adminhelpstac.sp
RicochetYT 6d119bc
Create sbpstac.sp
RicochetYT 2de60f2
Create sbpstac.inc
RicochetYT File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
"Games" | ||
{ | ||
"#default" | ||
{ | ||
"Keys" | ||
{ | ||
"EngineInterface" "VEngineServer021" | ||
} | ||
"Signatures" | ||
{ | ||
"CreateInterface" | ||
{ | ||
"library" "engine" | ||
"windows" "@CreateInterface" | ||
"linux" "@CreateInterface" | ||
} | ||
} | ||
"Offsets" | ||
{ | ||
"ClientPrintf" | ||
{ | ||
"windows" "45" | ||
"linux" "45" | ||
} | ||
} | ||
} | ||
|
||
"cstrike" | ||
{ | ||
"Keys" | ||
{ | ||
"EngineInterface" "VEngineServer023" | ||
} | ||
"Offsets" | ||
{ | ||
"ClientPrintf" | ||
{ | ||
"windows" "45" | ||
"linux" "45" | ||
} | ||
} | ||
} | ||
|
||
"tf" | ||
{ | ||
"Keys" | ||
{ | ||
"EngineInterface" "VEngineServer023" | ||
} | ||
"Offsets" | ||
{ | ||
"ClientPrintf" | ||
{ | ||
"windows" "45" | ||
"linux" "45" | ||
} | ||
} | ||
} | ||
|
||
"csgo" | ||
{ | ||
"Keys" | ||
{ | ||
"EngineInterface" "VEngineServer023" | ||
} | ||
"Offsets" | ||
{ | ||
"ClientPrintf" | ||
{ | ||
"windows" "47" | ||
"linux" "47" | ||
} | ||
} | ||
} | ||
|
||
"left4dead2" | ||
{ | ||
"Keys" | ||
{ | ||
"EngineInterface" "VEngineServer022" | ||
} | ||
"Offsets" | ||
{ | ||
"ClientPrintf" | ||
{ | ||
"windows" "46" | ||
"linux" "46" | ||
} | ||
} | ||
} | ||
|
||
"nmrih" | ||
{ | ||
"Keys" | ||
{ | ||
"EngineInterface" "VEngineServer023" | ||
} | ||
"Offsets" | ||
{ | ||
"ClientPrintf" | ||
{ | ||
"windows" "45" | ||
"linux" "45" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,190 @@ | ||
/** | ||
* vim: set ts=4 : | ||
* ============================================================================= | ||
* SourceMod Admin Help Plugin | ||
* Displays and searches SourceMod commands and descriptions. | ||
* | ||
* SourceMod (C)2004-2008 AlliedModders LLC. All rights reserved. | ||
* ============================================================================= | ||
* | ||
* This program is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU General Public License, version 3.0, as published by the | ||
* Free Software Foundation. | ||
* | ||
* This program is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more | ||
* details. | ||
* | ||
* You should have received a copy of the GNU General Public License along with | ||
* this program. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* As a special exception, AlliedModders LLC gives you permission to link the | ||
* code of this program (as well as its derivative works) to "Half-Life 2," the | ||
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software | ||
* by the Valve Corporation. You must obey the GNU General Public License in | ||
* all respects for all other code used. Additionally, AlliedModders LLC grants | ||
* this exception to all derivative works. AlliedModders LLC defines further | ||
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), | ||
* or <http://www.sourcemod.net/license.php>. | ||
* | ||
* Version: $Id$ | ||
*/ | ||
|
||
#pragma semicolon 1 | ||
|
||
#include <sourcemod> | ||
|
||
#pragma newdecls required | ||
|
||
#define COMMANDS_PER_PAGE 10 | ||
|
||
public Plugin myinfo = | ||
{ | ||
name = "Admin Help", | ||
author = "AlliedModders LLC", | ||
description = "Display command information", | ||
version = SOURCEMOD_VERSION, | ||
url = "http://www.sourcemod.net/" | ||
}; | ||
|
||
public void OnPluginStart() | ||
{ | ||
LoadTranslations("common.phrases"); | ||
LoadTranslations("adminhelp.phrases"); | ||
RegConsoleCmd("sm_help", HelpCmd, "Displays SourceMod commands and descriptions"); | ||
RegConsoleCmd("sm_searchcmd", HelpCmd, "Searches SourceMod commands"); | ||
} | ||
|
||
public Action HelpCmd(int client, int args) | ||
{ | ||
if (client && !IsClientInGame(client)) | ||
{ | ||
return Plugin_Handled; | ||
} | ||
|
||
char arg[64], cmdName[20]; | ||
int pageNum = 1; | ||
bool doSearch; | ||
|
||
GetCmdArg(0, cmdName, sizeof(cmdName)); | ||
|
||
if (args >= 1) | ||
{ | ||
GetCmdArg(1, arg, sizeof(arg)); | ||
StringToIntEx(arg, pageNum); | ||
pageNum = (pageNum <= 0) ? 1 : pageNum; | ||
} | ||
|
||
doSearch = (strcmp("sm_help", cmdName) == 0) ? false : true; | ||
|
||
if (GetCmdReplySource() == SM_REPLY_TO_CHAT) | ||
{ | ||
ReplyToCommand(client, "[SM] %t", "See console for output"); | ||
} | ||
|
||
char name[64]; | ||
char desc[255]; | ||
char noDesc[128]; | ||
CommandIterator cmdIter = new CommandIterator(); | ||
|
||
FormatEx(noDesc, sizeof(noDesc), "%T", "No description available", client); | ||
|
||
if (doSearch) | ||
{ | ||
int i = 1; | ||
while (cmdIter.Next()) | ||
{ | ||
cmdIter.GetName(name, sizeof(name)); | ||
cmdIter.GetDescription(desc, sizeof(desc)); | ||
|
||
if (CheckCommandAccess(client, "sm_admin", ADMFLAG_ROOT, true)) | ||
{ | ||
if ((StrContains(name, arg, false) != -1) && CheckCommandAccess(client, name, cmdIter.Flags)) | ||
{ | ||
PrintToConsole(client, "[%03d] %s - %s", i++, name, (desc[0] == '\0') ? noDesc : desc); | ||
} | ||
} | ||
else | ||
{ | ||
if ((StrContains(name, arg, false) != -1) && (StrContains(name, "stac", false) == -1) && CheckCommandAccess(client, name, cmdIter.Flags)) | ||
{ | ||
PrintToConsole(client, "[%03d] %s - %s", i++, name, (desc[0] == '\0') ? noDesc : desc); | ||
} | ||
} | ||
} | ||
|
||
if (i == 1) | ||
{ | ||
PrintToConsole(client, "%t", "No matching results found"); | ||
} | ||
} else { | ||
PrintToConsole(client, "%t", "SM help commands"); | ||
|
||
/* Skip the first N commands if we need to */ | ||
if (pageNum > 1) | ||
{ | ||
int i; | ||
int endCmd = (pageNum-1) * COMMANDS_PER_PAGE - 1; | ||
for (i=0; cmdIter.Next() && i<endCmd; ) | ||
{ | ||
cmdIter.GetName(name, sizeof(name)); | ||
|
||
if (CheckCommandAccess(client, name, cmdIter.Flags)) | ||
{ | ||
i++; | ||
} | ||
} | ||
|
||
if (i == 0) | ||
{ | ||
PrintToConsole(client, "%t", "No commands available"); | ||
delete cmdIter; | ||
return Plugin_Handled; | ||
} | ||
} | ||
|
||
/* Start printing the commands to the client */ | ||
int i; | ||
int StartCmd = (pageNum-1) * COMMANDS_PER_PAGE; | ||
for (i=0; cmdIter.Next() && i<COMMANDS_PER_PAGE; ) | ||
{ | ||
cmdIter.GetName(name, sizeof(name)); | ||
cmdIter.GetDescription(desc, sizeof(desc)); | ||
|
||
if (CheckCommandAccess(client, "sm_admin", ADMFLAG_ROOT, true)) | ||
{ | ||
if (CheckCommandAccess(client, name, cmdIter.Flags)) | ||
{ | ||
i++; | ||
PrintToConsole(client, "[%03d] %s - %s", i+StartCmd, name, (desc[0] == '\0') ? noDesc : desc); | ||
} | ||
} | ||
else | ||
{ | ||
if ((StrContains(name, "stac", false) == -1) && CheckCommandAccess(client, name, cmdIter.Flags)) | ||
{ | ||
i++; | ||
PrintToConsole(client, "[%03d] %s - %s", i+StartCmd, name, (desc[0] == '\0') ? noDesc : desc); | ||
} | ||
} | ||
} | ||
|
||
if (i == 0) | ||
{ | ||
PrintToConsole(client, "%t", "No commands available"); | ||
} else { | ||
PrintToConsole(client, "%t", "Entries n - m in page k", StartCmd+1, i+StartCmd, pageNum); | ||
} | ||
|
||
/* Test if there are more commands available */ | ||
if (cmdIter.Next()) | ||
{ | ||
PrintToConsole(client, "%t", "Type sm_help to see more", pageNum+1); | ||
} | ||
} | ||
|
||
delete cmdIter; | ||
|
||
return Plugin_Handled; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#if defined _sbpstac_included | ||
#endinput | ||
#endif | ||
#define __sbpstac_included_included | ||
|
||
public SharedPlugin __pl_sbpstac = | ||
{ | ||
name = "sbpstac", | ||
file = "sbpstac.smx", | ||
#if defined REQUIRE_PLUGIN | ||
required = 1, | ||
#else | ||
required = 0, | ||
#endif | ||
}; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not going to bundle the adminhelp/bara plugins, way too heavy and overintrusive, sorry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the best way I found to hide certain plugins with my fork of SBP, but there are more simple things you could do, or just not do this at all.