Auto message
#1

Simple question, how do I make one I'v searched for tutorials so if some one could tell mea simple way to make one
To like make messages like "Join us at teamspeak IP: and The server owner is blahblah etc
Reply
#2

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

Should help you get started.

Or these tutorials:

http://forum.sa-mp.com/showthread.ph...t=auto+message
http://forum.sa-mp.com/showthread.ph...t=auto+message
Reply
#3

Wow, I know about SetTimer, I just dont know how I would do the whole automated messages.. Could you post an example of an automated message instead of a link to SetTimer? thanks.
Reply
#4

Quote:
Originally Posted by Azzeto
Посмотреть сообщение
Wow, I know about SetTimer, I just dont know how I would do the whole automated messages.. Could you post an example of an automated message instead of a link to SetTimer? thanks.
Check my first post.
Reply
#5

hey,

firstly you will need to put this somewhere in your script:

pawn Код:
new RandomMSG[][] =
{
    "message 1",
    "message 2",
    "message 3",
    "message 4"
};
of course change "message 1 -5" to what you want also you can have as many of these as you like.

okay next put this i OnGameModeInit()
pawn Код:
SetTimer("SendMSG", 300000, true);
change the milliseconds as you wish

then you need this also some where in your script:

pawn Код:
forward SendMSG();
public SendMSG()
{
    new randMSG = random(sizeof(RandomMSG));
    SendClientMessageToAll(COLOR_RANDOM, RandomMSG[randMSG]);
    return 1;
}
hope this help


EDIT didn't see that Stigg had replied also read Stiggs post below
Reply
#6

Your code^^
pawn Код:
new RandomMSG[][] =
{
    "message 1",
    "message 2",
    "message 3,
    "
message 4"
};
Should be:

pawn Код:
new RandomMSG[][] =
{
    "message 1",
    "message 2",
    "message 3",
    "message 4"
};
Just a heads up.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)