
If you want, I can implement a new native that hooks this function (in the previous module I gave you about fakeping). And if there is another way, it doesn't come to my mind for now. The Metamod's UTIL functions need to be used inside a module, then, you can only use them with the current Metamod module running (PLID, which is the pointer of the PluginInfo struct for the plugin).Īs I said, you need to hook a function to get that result. I was thinking you wanted to filter in order to retrieve the available ones (properly loaded by Metamod, or according to a specific order), not the ones listed but which may fail, or something like this. Well, usually, get use to give such server infos, and just the name of your game as a complement, because we'll easily know.Ībout the DLLs declared, yes, you can do that.īut from that you've specified I didn't told you this because you already know which one is loaded since you set up the file. Or if not, the whole result of "version" server command should be provided, I/people will know which protocol/platform/engine/game version users are talking about. So don't forget "CS", cause "1.5" is not accurate and means nothing to me.Īnd 1.5 is the version of CS, which is the game version, not the version of HL, WON is the platform, even if modern people doesn't really know, this should be used instead. How do i call this function in an amx plugin? Ĭan you tell me how to use this please? I want to retrieve GINFO_DESC and GINFO_DLL_FILENAME from this function. The returned string is a pointer to a static buffer, and should be copied by the caller to local storage. GINFO_DLL_FILENAME - bare filename of the gamedll (ie "cs_i386.so") GINFO_DLL_FULLPATH - full pathname of the game dll (ie "/usr/local/half-life/cstrike/dlls/cs_i386.so") GINFO_GAMEDIR - game directory, full pathname (ie "/usr/local/half-life/cstrike") GINFO_DESC - long name of game, from autodetection (ie "Counter-Strike") GINFO_NAME - short name of game, from "-game" argument to hlds (ie "cstrike") Returns various string-based information about the running game/MOD/gamedll.

Quote:const char * GET_GAME_INFO(PLID, ginfo_t type) However, you said there are UTIL functions so i googled them and one of them does exactly what i want! Either by putting "gamedll name.dll" in "addons/metamod/config.ini" or by starting the game with "+localinfo mm_gamedll path_to_dll".

I know of 2 ways to load a custom GameDLL in Metamod. If (contain(localinfo, "jumbot.dll")!=-1)

If (contain(szData, "gamedll")!=-1 & contain(szData, " gamedll")=-1 & contain(szData, "jumbot.dll")!=-1)Ĭonsole_print(0, "Notification: Jumbot has been detected. While (read_file("addons/metamod/config.ini", iLine, szData, 32, iTextLength) != 0) If (file_exists("addons/metamod/config.ini"))
