SA-MP Forums Archive
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)
+--- Thread: Random Messages (/showthread.php?tid=471057)



Random Messages - Axey187 - 20.10.2013

Hello ,

Could you please write the code for me about how to add random messages on the server? Also I need to know how to change the time . I would be grateful if you can explain for me in the code by adding the " /* " .

Thank you !


Re: Random Messages - ***Niko*** - 20.10.2013

https://sampwiki.blast.hk/wiki/Random_Messages


Re: Random Messages - Axey187 - 21.10.2013

I already read it but It doesn't help enough . I want someone to show me an example so I can edit it.

Thanks for replying .


Re: Random Messages - ***Niko*** - 21.10.2013

Well there is explaned all i don't know what you don't understand i will give you my code but it's same as wiki one...
Put this on top of the GM near forwards
pawn Код:
forward SendMSG(playerid);
put where you define new
pawn Код:
new RandomMSG[][] =
{
    "your txt.",
    "your txt."
};
put near your publics
pawn Код:
public SendMSG(playerid)
{
    if(HelpMessages[playerid] == 1)
    {
        new randMSG = random(sizeof(RandomMSG));
        SendClientMessageToAll(COLOR_SIMPSONS, RandomMSG[randMSG]);
    }
}
Put this under "public OnGameModeInit"
pawn Код:
SetTimer("SendMSG", 450000, true);



Re: Random Messages - Axey187 - 21.10.2013

I want it in a filterscript anyways , thanks .


Re: Random Messages - ***Niko*** - 21.10.2013

Then post a request not a script help...


Re: Random Messages - zT KiNgKoNg - 21.10.2013

You're clearly asking for someone to 'create' this for 'you' in the 'Scripting Help' section, if you're not happy with the example ***Niko*** has given you then i suggest looking on the wiki and constantly reading so you know what you're doing, or posting a request on one of the six script request threads.