13.03.2019, 15:58
Hello, I'm wondering how to make gamemode to send a given message to the chat after some period of time, I'm wondering if any callback like that exist, also I would appreciate for any help.

//In OnGameModeInit
SetTimer("SendServerMessage", 1000*60*5, 0); //Sends after 5min a Message to the server
//Outside any function
forward SendServerMessage();
public SendServerMessage()
{
SendClientMessageToAll(-1, "* This is a Message, sent after 5min of the Server start!");
return 1;
}
Thanks! I also have one more question, How do I make it to be sent after each 5 minutes? (not only after a server start)
|
SetTimer("SendServerMessage", 1000*60*5, true); forward SendServerMessage(); public SendServerMessage() { SendClientMessageToAll(-1, "* This is a Message, sent after 5min of the Server start!"); return 1; }