SA-MP Forums Archive
Rnadom Message help +rep - 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: Rnadom Message help +rep (/showthread.php?tid=567973)



Rnadom Message help +rep - Miller007 - 18.03.2015

Solved


AW: Rnadom Message help +rep - Kaliber - 18.03.2015

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


Re: Rnadom Message help +rep - Miller007 - 18.03.2015

i put that in ongameinit and it shows these errors




Re: Rnadom Message help +rep - Miller007 - 18.03.2015

Solved


AW: Rnadom Message help +rep - Kaliber - 18.03.2015

Do the function at the end...not in a other function


Re: AW: Rnadom Message help +rep - [ABK]Antonio - 18.03.2015

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))]);



AW: Re: AW: Rnadom Message help +rep - Kaliber - 18.03.2015

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


Re: AW: Re: AW: Rnadom Message help +rep - [ABK]Antonio - 18.03.2015

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


AW: Re: AW: Re: AW: Rnadom Message help +rep - Kaliber - 18.03.2015

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