08.07.2012, 05:58
You need to learn to do arrays if you want random messages.
pawn Код:
new
szRandMessages[][] = {
{"Message one"}, // 0
{"Message two"}, // 1
{"Message three"}, // 2
{"Message four"}, // 3
{"Message five"}, // 4
{"Message six"}}; // 5
public OnGameModeInit()
{
SetTimer("RandomMessages", 30000, 1);
return 1;
}
forward RandomMessages();
public RandomMessages()
{
SendClientMessageToAll(-1, szRandMessages[random(sizeof(szRandMessages))]);
print("30 secs");
return 1;
}