Code:
new Float:repTime = 1.0 // this sets how many seconds you want between each show
set_task(repTime, "showMsg", 0, .flags="b")
PHP Code:
public client_putinserver()
{
showMsg()
}
public showMsg()
{
new map[33], timeleft[9]
get_mapname(map,32)
new seconds = get_timeleft()%60
new minutes = floatround( (get_timeleft() - seconds) / 60 )
format(timeleft, 8, "%d:%d", minutes, seconds)
set_hudmessage(255, 250, 205, -1.0, 0.0, 1, 6.0, 1.0)
show_hudmessage(0, "%s - CURRENT MAP:^n%s^nTIMELEFT: %s", HOTNAME, map, timeleft)
return 1
}
if my math for determining minutes and seconds is correct.
corrections: -set_task function needs args in order to repeat the task

-you shouldn't put set_task in the client_putinserver function; it'll set the task as many times as people join
-%s signifies you're showing a string. while your variable was defined as an int
-timeleft returns the time left in seconds: not very user friendly, so i put it to a string w/ the min:sec for you (assuming my math is correct)
NOTE: put the first code block into your plugin_init, that will initialize it properly.
ALSO: someone check his set_hudmessage i'm too tired to deal with that bloody function call right now. too man god damn periods and commas. it hurts my eyes