diff --git a/Extension/gsnatives.cpp b/Extension/gsnatives.cpp index 17dbb5f..ecc6b80 100644 --- a/Extension/gsnatives.cpp +++ b/Extension/gsnatives.cpp @@ -104,6 +104,22 @@ static cell_t sm_SetGameDescription(IPluginContext *pContext, const cell_t *para return 1; } +static cell_t sm_SetMapName(IPluginContext *pContext, const cell_t *params) +{ + ISteamGameServer *pServer = GetGSPointer(); + + if (pServer == NULL) + { + return 0; + } + + char *pMapName; + pContext->LocalToString(params[1], &pMapName); + + pServer->SetMapName(pMapName); + return 1; +} + static cell_t sm_IsConnected(IPluginContext *pContext, const cell_t *params) { ISteamGameServer *pServer = GetGSPointer(); @@ -252,6 +268,7 @@ static sp_nativeinfo_t gsnatives[] = { {"SteamWorks_GetPublicIPCell", sm_GetPublicIPCell}, {"SteamWorks_IsLoaded", sm_IsLoaded}, {"SteamWorks_SetGameDescription", sm_SetGameDescription}, + {"SteamWorks_SetMapName", sm_SetMapName}, {"SteamWorks_IsConnected", sm_IsConnected}, {"SteamWorks_SetRule", sm_SetRule}, {"SteamWorks_ClearRules", sm_ClearRules}, diff --git a/Pawn/includes/SteamWorks.inc b/Pawn/includes/SteamWorks.inc index 08ae8b8..1278142 100644 --- a/Pawn/includes/SteamWorks.inc +++ b/Pawn/includes/SteamWorks.inc @@ -216,6 +216,7 @@ native bool:SteamWorks_GetPublicIP(ipaddr[4]); native SteamWorks_GetPublicIPCell(); native bool:SteamWorks_IsLoaded(); native bool:SteamWorks_SetGameDescription(String:sDesc[]); +native bool:SteamWorks_SetMapName(String:sMapName[]); native bool:SteamWorks_IsConnected(); native bool:SteamWorks_SetRule(const String:sKey[], const String:sValue[]); native bool:SteamWorks_ClearRules();