Hi, Im trying to get
to show mapName in the text, but it doesn't want to show up, im very new to all of this and im just trying to modify this plugins :
https://forums.alliedmods.net/showthread.php?t=309700
Code:
#include <sourcemod>
public Plugin myinfo =
{
name = "Panorama - Timeleft",
author = "Fastmancz",
description = "Shows timeleft at the bottom of the screen",
version = "1.0.1"
};
public void OnPluginStart()
{
CreateTimer(1.0, Timeleft, _, TIMER_REPEAT);
}
public Action Timeleft(Handle timer)
{
char sTime[60];
int iTimeleft;
char mapName[100]; //this is the variable I added
GetCurrentMap(mapName, sizeof(mapName));
GetMapTimeLeft(iTimeleft);
if(iTimeleft > 0)
{
FormatTime(sTime, sizeof(sTime), "%M:%S", iTimeleft);
for(int i = 1; i <= MaxClients; i++)
{
if(IsClientInGame(i) && !IsFakeClient(i))
{
char message[160];
Format(message, sizeof(message), "surf-ftw.com - Timeleft: %s mapName", sTime); //trying to put it there
SetHudTextParams(-1.0, 1.00, 1.0, 4, 180, 255, 255, 0, 0.00, 0.00, 0.00);
ShowHudText(i, -1, message);
}
}
}
return Plugin_Continue;
}