[Help] Random Messages
#1

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.
Reply
#2

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
Reply
#3

I'll test this, Thanks wesely.
*hugs*
Under What i'll place this? Imma place it under gamemode
Reply
#4

Or you can use the random function.

https://sampwiki.blast.hk/wiki/Random_Messages
Reply
#5

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*
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)