MCPcopy Create free account
hub / github.com/alliedmodders/sourcemod / SM_ExecuteForPlugin

Function SM_ExecuteForPlugin

core/CoreConfig.cpp:765–785  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

763}
764
765void SM_ExecuteForPlugin(IPluginContext *ctx)
766{
767 SMPlugin *plugin = scripts->FindPluginByContext(ctx);
768
769 unsigned int num = plugin->GetConfigCount();
770 if (!num)
771 {
772 SM_DoSingleExecFwds(ctx);
773 }
774 else
775 {
776 bool can_create = true;
777 for (unsigned int i=0; i<num; i++)
778 {
779 can_create = SM_ExecuteConfig(plugin, plugin->GetConfig(i), can_create);
780 }
781 char cmd[255];
782 ke::SafeSprintf(cmd, sizeof(cmd), "sm_internal 2 %d\n", plugin->GetSerial());
783 engine->ServerCommand(cmd);
784 }
785}
786
787void SM_ExecuteAllConfigs()
788{

Callers

nothing calls this directly

Calls 7

SM_DoSingleExecFwdsFunction · 0.85
SM_ExecuteConfigFunction · 0.85
GetConfigCountMethod · 0.80
GetConfigMethod · 0.80
FindPluginByContextMethod · 0.45
GetSerialMethod · 0.45
ServerCommandMethod · 0.45

Tested by

no test coverage detected