Question: What's is the best random message code
#1

What's the best random message code.


Timer + Don't recall the same message
Reply
#2

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

Yes, and set const variable if your messages donґt use a dinamic system for more velocity
Reply
#4

Quote:
Originally Posted by ISmokezU
Посмотреть сообщение
I try that. it kept re-calling the same messages. over over again. and What time should call out?
Reply
#5

Quote:
Originally Posted by DerickClark
Посмотреть сообщение
I try that. it kept re-calling the same messages. over over again. and What time should call out?
Show code.
Reply
#6

Quote:
Originally Posted by ISmokezU
Посмотреть сообщение
Show code.
Random Messages need more improvements

Код:
forward SendMSG();
new RandomMSG[][] =
{
    "Random Message 1",
    "Random Message 2",
    "Random Message 3"
};

public SendMSG()
{
    new randMSG = random(sizeof(RandomMSG));
    SendClientMessageToAll(-1, RandomMSG[randMSG]); 
}
Код:
public OnGameModeInit()
{
    SetTimer("SendMSG", 60000, true); // whats the right timer? (So it won't call too fast)
}
Reply
#7

http://pastebin.com/nJw7LdXt

FS form, but can obviously snip out the code into a GM.
Reply
#8

Quote:
Originally Posted by rymax99
Посмотреть сообщение
http://pastebin.com/nJw7LdXt

FS form, but can obviously snip out the code into a GM.
It re-call the same message like.


First: [TIP]: test3

Again: [TIP]: test3


I need to add more of randon messages that why?
Reply
#9

Do you really want a random message (except the current one) or do you want to show all messages in random order?

In the first case that could happen

Random Message 1
Random Message 2
Random Message 1
Random Message 2
Random Message 1
Random Message 3

Or do you want to show all messages in random order and than repeat ?

Random Message 1
Random Message 3
Random Message 2
Random Message 3
Random Message 1
Random Message 2
Reply
#10

Quote:
Originally Posted by Nero_3D
Посмотреть сообщение
Do you really want a random message (expect the current one) or do you want to show all messages in random order?

In the first case that could happen

Random Message 1
Random Message 2
Random Message 1
Random Message 2
Random Message 1
Random Message 3

Or do you want to show all messages in random order and than repeat ?

Random Message 1
Random Message 3
Random Message 2
Random Message 3
Random Message 1
Random Message 2
Random Message 1
Random Message 3
Random Message 2
Random Message 3
Random Message 1
Random Message 2
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)