Rnadom Message help +rep
#1

Solved
Reply
#2

Here you go: http://pastebin.com/RYgQnL6c

To use it, make sth like this:

Код:
new value; //at the top

SetTimer("call",1000,1); //here the timer function

forward call();
public call()
{
    value++;
    if(value > 9) value = 1;
    SendClientMessageToAll(-1,GetRandom(value));
    return 1;
}
Greekz
Reply
#3

i put that in ongameinit and it shows these errors

Reply
#4

Solved
Reply
#5

Do the function at the end...not in a other function
Reply
#6

Quote:
Originally Posted by Kaliber
Посмотреть сообщение
Here you go: http://pastebin.com/RYgQnL6c

To use it, make sth like this:

Код:
new value; //at the top

SetTimer("call",1000,1); //here the timer function

forward call();
public call()
{
    value++;
    if(value > 9) value = 1;
    SendClientMessageToAll(-1,GetRandom(value));
    return 1;
}
Greekz
pawn Код:
new RandomMessage[9][100] = {
    "", //All of your random messages go in these
    "",
    "",
    //etc
};

SendClientMessageToAll(your_color_here, RandomMessage[random(sizeof(RandomMessage))]);
Reply
#7

Quote:
Originally Posted by [ABK]Antonio
Посмотреть сообщение
pawn Код:
new RandomMessage[9][100] = {
    "", //All of your random messages go in these
    "",
    "",
    //etc
};

SendClientMessageToAll(your_color_here, RandomMessage[random(sizeof(RandomMessage))]);
I made it for him already.

But think about it why your solution would not work
Reply
#8

Quote:
Originally Posted by Kaliber
Посмотреть сообщение
I made it for him already.

But think about it why your solution would not work
With a little bit of modification it would, but yeah i completely misread the original post lol
Reply
#9

Quote:
Originally Posted by [ABK]Antonio
Посмотреть сообщение
With a little bit of modification it wouldl
No, because sometimes you need only 2 random messages and then 6...u cant store that all in one array because the size need to be the same
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)