[Help] Random Messages - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Help] Random Messages (
/showthread.php?tid=277184)
[Help] Random Messages -
Trawltrawl - 16.08.2011
Hello guys, im a new scripter in Pawno, and i'd really be happy if anyone would tell me how to make a random message appear like in 5 minutes
Ex:
[Info]: This server has been made by TrawlTrawl
-- After 2 minutes
[Info]: Hacking results a ban.
I want to learn how to make this, and i will really appreciate who'll help me in this.
Best Regards,
TrawlTrawl.
Re: [Help] Random Messages -
Wesley221 - 16.08.2011
pawn Код:
SetTimer("Messages", time here, 1);
forward Messages();
public Messages()
{
new rand = random(5);
if(rand == 0) return rand +1;
switch(rand)
{
case 1: SendClientMessageToAll(C_GREEN, MESSAGE1);
case 2: SendClientMessageToAll(C_GREEN, MESSAGE2);
case 3: SendClientMessageToAll(C_GREEN, string);
case 4: SendClientMessageToAll(C_GREEN, MESSAGE4);
case 5: SendClientMessageToAll(C_GREEN, MESSAGE5);
}
return 1;
}
This would do it
Re: [Help] Random Messages -
Trawltrawl - 16.08.2011
I'll test this, Thanks wesely.
*hugs*
Under What i'll place this? Imma place it under gamemode
Re: [Help] Random Messages -
Snipa - 16.08.2011
Or you can use the random function.
https://sampwiki.blast.hk/wiki/Random_Messages
Re: [Help] Random Messages -
Trawltrawl - 16.08.2011
Thanks snipa, but wesly's info helped, i'll use the link u send me to learn how to use it(not just copy paste)
Thanks both of you!
*hugs*