| 1081 | { |
| 1082 | #else |
| 1083 | void PlayerManager::OnClientCommand(edict_t *pEntity) |
| 1084 | { |
| 1085 | CCommand args; |
| 1086 | #endif |
| 1087 | |
| 1088 | cell_t res = Pl_Continue; |
| 1089 | int client = IndexOfEdict(pEntity); |
| 1090 | CPlayer *pPlayer = &m_Players[client]; |
| 1091 | |
| 1092 | if (!pPlayer->IsConnected()) |
| 1093 | { |
| 1094 | return; |
| 1095 | } |
| 1096 | |
| 1097 | if (strcmp(args.Arg(0), "sm") == 0) |
| 1098 | { |
| 1099 | if (args.ArgC() > 1 && strcmp(args.Arg(1), "plugins") == 0) |
| 1100 | { |
| 1101 | ListPluginsToClient(pPlayer, args); |
| 1102 | RETURN_META(MRES_SUPERCEDE); |
| 1103 | } |
| 1104 | else if (args.ArgC() > 1 && strcmp(args.Arg(1), "exts") == 0) |
| 1105 | { |
| 1106 | ListExtensionsToClient(pPlayer, args); |
| 1107 | RETURN_META(MRES_SUPERCEDE); |
| 1108 | } |
| 1109 | else if (args.ArgC() > 1 && strcmp(args.Arg(1), "credits") == 0) |
| 1110 | { |
| 1111 | ClientConsolePrint(pEntity, |
| 1112 | "SourceMod would not be possible without:"); |
| 1113 | ClientConsolePrint(pEntity, |
| 1114 | " David \"BAILOPAN\" Anderson, Matt \"pRED\" Woodrow"); |
| 1115 | ClientConsolePrint(pEntity, |
| 1116 | " Scott \"DS\" Ehlert, Fyren"); |
| 1117 | ClientConsolePrint(pEntity, |
| 1118 | " Nicholas \"psychonic\" Hastings, Asher \"asherkin\" Baker"); |
| 1119 | ClientConsolePrint(pEntity, |
| 1120 | " Ruben \"Dr!fter\" Gonzalez, Josh \"KyleS\" Allard"); |
| 1121 | ClientConsolePrint(pEntity, |
| 1122 | " Michael \"Headline\" Flaherty, Jannik \"Peace-Maker\" Hartung"); |
| 1123 | ClientConsolePrint(pEntity, |
| 1124 | " Borja \"faluco\" Ferrer, Pavol \"PM OnoTo\" Marko"); |
| 1125 | ClientConsolePrint(pEntity, |
| 1126 | "SourceMod is open source under the GNU General Public License."); |
| 1127 | RETURN_META(MRES_SUPERCEDE); |
| 1128 | } |
| 1129 | |
| 1130 | ClientConsolePrint(pEntity, |
| 1131 | "SourceMod %s, by AlliedModders LLC", SOURCEMOD_VERSION); |
| 1132 | ClientConsolePrint(pEntity, |
| 1133 | "To see running plugins, type \"sm plugins\""); |
| 1134 | ClientConsolePrint(pEntity, |
| 1135 | "To see credits, type \"sm credits\""); |
| 1136 | ClientConsolePrint(pEntity, |
| 1137 | "Visit https://www.sourcemod.net/"); |
| 1138 | RETURN_META(MRES_SUPERCEDE); |
| 1139 | } |
| 1140 |
nothing calls this directly
no test coverage detected