You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Make sure people know that the chat is being recorded if webhook is set
1077
1069
if (p2mm_discord_webhooks.GetBool())
1078
1070
{
1079
-
if (CBasePlayer* pPlayer = UTIL_PlayerByIndex(entindex))
1071
+
if (CBasePlayer* pPlayer = UTIL_PlayerByIndex(entIndex))
1080
1072
{
1081
-
Log(INFO, true, "Warning for enabled webhooks sent to player index %i.", entindex);
1073
+
Log(INFO, true, "Warning for enabled webhooks sent to player index %i.", entIndex);
1082
1074
UTIL_ClientPrint(pPlayer, HUD_PRINTTALK, "This lobby has Discord Webhook Integration enabled. All of your in-game messages may be sent to a Discord channel.");
1083
1075
}
1084
1076
}
1085
1077
1086
1078
if (g_pScriptVM)
1087
1079
{
1088
1080
// Handling OnPlayerJoin VScript event
1089
-
if (HSCRIPT opj_func = g_pScriptVM->LookupFunction("OnPlayerJoin"))
1081
+
if (constHSCRIPT opjFunc = g_pScriptVM->LookupFunction("OnPlayerJoin"))
Log(WARNING, false, "Could not register or run our VScript functions!");
305
+
assert(0 && "Unable to load g_pScriptVM!");
306
+
Log(ERRORR, false, "P2:MM was unable to load g_pScriptVM!\nThis is required for P2:MM to run!\nPlease report!");
316
307
return;
317
308
}
318
309
@@ -328,7 +319,6 @@ void RegisterFuncsAndRun()
328
319
ScriptRegisterFunction (g_pScriptVM, GetGameMainDir, "Returns the current game directory. Ex. portal2");
329
320
ScriptRegisterFunction (g_pScriptVM, GetGameRootDir, "Returns the current root game directory. Ex. Portal 2");
330
321
ScriptRegisterFunction (g_pScriptVM, GetLastMap, "Returns the last map recorded by the Last Map system.");
331
-
ScriptRegisterFunction (g_pScriptVM, FirstRunState, "Get or set the state of whether the first map was run or not. Set false/true = 0/1 | -1 to get state.");
332
322
ScriptRegisterFunction (g_pScriptVM, CallFirstRunPrompt, "Shows the first run prompt if enabled in config.nut.");
333
323
ScriptRegisterFunctionNamed(g_pScriptVM, GetConVarInt, "GetConVarInt", "Get the integer value of a ConVar.");
334
324
ScriptRegisterFunctionNamed(g_pScriptVM, GetConVarString, "GetConVarString", "Get the string value of a ConVar.");
0 commit comments