14.02.2011, 13:33
I need to set a text "If you need any help do /help" like this.
It should be automatically come in a fixed time .how to do this?
It should be automatically come in a fixed time .how to do this?
forward message();
public OnGameModeInit()
{
print("Starting timer...");
SetTimer("message",1000,false); // Set a timer of 1000 miliseconds (1 second)
}
public message()
{
print("1 second has passed.");
//Timer, set time to whatever you want
//OnGameModeInit
SetTimer("RandomClientMessage",240000,1);
new Advertisement[][] = //RandomTimerClientMessages
{
{"message1"},
{"message2"},
{"message3"}
};
//Announcer/Advertisement Timer
forward RandomClientMessage();
public RandomClientMessage()
{
new randommessage = random(sizeof(Advertisement));
new Advertisementstring[140];
format(Advertisementstring, sizeof(Advertisementstring),"%s",Advertisement[randommessage]);
SendClientMessageToAll(0xFFFF00FF, Advertisementstring);
}