Posts: 422
Threads: 107
Joined: Sep 2013
Reputation:
0
Hi, how to make a random messages in the server like "Need help? have problem? /report for assistant."
I want it without heavy timers that take a lot of CPU...
Random messages will be sent randomly every 10 minutes.
Thanks.
Posts: 438
Threads: 54
Joined: Mar 2013
Here one for you
pawn Код:
#define GREEN 0x15FF00AA
new RandomMessages[][] = {
"{FFFFFF}[Info]: {63F279}Like our server? Add us in favourite!",
"{FFFFFF}[Info]: {63F279}To get more knowledge about the current commands, please use /cmds.",
"{FFFFFF}[Info]: {63F279}You want to check your stats? use /stats [Your ID], you can check other's stats
"{FFFFFF}[Info]: {63F279}Use /admins to see the current online staff members.",
"{FFFFFF}[Info]: {63F279}Spotted a hacker? don't panic, use /report [ID] [Reason] and let our staff team handle it.",
"{FFFFFF}[Info]: {63F279}You want to help the server grow up? donate for us to keep us alive!"
};
forward RandomMessage();
public RandomMessage()
{
SendClientMessageToAll(GREEN, RandomMessages[random(sizeof(RandomMessages))]);
return 1;
}
public OnGameModeInit()
{
SetTimer("RandomMessage", 60000, 1); // 1 Minutes
return 1;
}