10.08.2011, 15:16
Hello guys, how can i make an automatic message that will appear ine the chat every 20 minutes
#include "a_samp"
#define MINUTES(%1) ((%1)*(60*1000))
new RandomMessages[][] =
{
"Your random messages here",
"I",
"Love",
"You Riddick!" // after last you can't put ','
};
public OnGameModeInit()
{
SetTimer("AutomaticMessage", MINUTES(10), true);
return true;
}
forward AutomaticMessage();
public AutomaticMessage()
{
new RandomMessage = random(sizeof(RandomMessages));
SendClientMessageToAll(-1, RandomMessages[RandomMessage]); // -1 is a colour for a message.
return true;
}