Hey! I saw a few guys asking how to get the full game path to sourcemod
This might also work on other games
Code:
#include <sourcemod>
public void OnPluginStart()
{
HookEvent("server_spawn", ServerSpawn);
}
public Action ServerSpawn(Event event, const char[] name, bool dontBroadcast)
{
//Outputs G:\steamcmd\steamapps\common\Counter-Strike Global Offensive Beta - Dedicated Server\csgo
char game[256];
event.GetString("game", game, sizeof(game));
char sm_path[128];
BuildPath(Path_SM, sm_path, sizeof(sm_path), "");
char full_path[400];
Format(full_path, sizeof(full_path), "%s\\%s", game, sm_path);
PrintToServer("Full Path: %s", full_path);
//Output: Full Path: G:\steamcmd\steamapps\common\Counter-Strike Global Offensive Beta - Dedicated Server\csgo\addons\sourcemod\
UnhookEvent("server_spawn", ServerSpawn);
}