From 316ddad7ab93fe24d370113f4829c73eecc5b6b7 Mon Sep 17 00:00:00 2001 From: Pavol Marko Date: Fri, 10 Sep 2004 20:58:55 +0000 Subject: [PATCH] Added the Format function to the module api --- amxmodx/modules.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/amxmodx/modules.cpp b/amxmodx/modules.cpp index eb2d3b51..54810cb9 100755 --- a/amxmodx/modules.cpp +++ b/amxmodx/modules.cpp @@ -950,6 +950,15 @@ edict_t* MNF_GetPlayerEdict(int id) return (GET_PLAYER_POINTER_I(id)->pEdict); } +const char *MNF_Format(const char *fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + const char *retVal = g_langMngr.FormatString(fmt, ap); + va_end(ap); + return retVal; +} + // Fnptr Request function for the new interface const char *g_LastRequestedFunc = NULL; #define REGISTER_FUNC(name, func) { name, (void*)func }, @@ -968,6 +977,7 @@ void *Module_ReqFnptr(const char *funcName) REGISTER_FUNC("GetModname", MNF_GetModname) REGISTER_FUNC("Log", MNF_Log) REGISTER_FUNC("MergeDefinitionFile", MNF_MergeDefinitionFile) + REGISTER_FUNC("Format", MNF_Format) // Amx scripts loading / unloading / managing REGISTER_FUNC("GetAmxScript", MNF_GetAmxScript)