Iwon, stop posting code you don't understand.
danielkza, register_task() is undefined. You don't need to iterate over each player when using HUD messages because passing 0 as the player ID does so automatically. I'm glad you raised the issue of the FM_PlayerPostThink, but the same can be said of set_task() (assuming that's what you intended to use).
If this were my server, I'd be displaying the HUD message for (mp_roundtime * 60) seconds once per round, but you'd need to make sure other plugins play nicely to do that. I'm pretty sure ESEA uses this method. Come to think of it, try this:
Code:
#include <amxmodx>
#pragma semicolon 1
new mp_roundtime;
public plugin_init()
{
register_event("HLTV", "onNewRound", "a", "1=0", "2=0");
mp_roundtime = get_cvar_pointer("mp_roundtime");
}
public client_putinserver(id)
{
//I'm not too sure how HUD messages interact with the MOTD
showMessage(id);
}
public onNewRound()
{
showMessage();
}
showMessage(id = 0)
{
//what a hideous native
set_hudmessage (/*R*/ _, /*G*/ _, /*B*/ _, /*X*/ _, /*Y*/ _, /*effects*/ _, /*fxtime*/ _, /*holdtime*/
float(get_pcvar_num(mp_roundtime) * 60 + 15), /*fadeintime*/ _, /*fadeouttime*/ _, /*channel*/ 3);
show_hudmessage(id, "Hello World.");
}
__________________