[Ajuda] ta mandando 3 vezes a mensagem depois muda - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] ta mandando 3 vezes a mensagem depois muda (
/showthread.php?tid=361551)
ta mandando 3 vezes a mensagem depois muda -
Math3us - 21.07.2012
pawn Code:
new mensagens[2][256] =
{"[INFO:] Quer ver comandos do server use /comandos",
"[INFO:] Quer dar aquela trepada violenta use /sexo"};
new cores[] = {
COLOR_ORANGE
};
forward RandomMSG();
public OnGameModeInit()
{
SetTimer("RandomMSG",150000,1);
public RandomMSG()
{
new string[256];
new random1 = random(sizeof(mensagens));
new random2 = random(sizeof(cores));
format(string, sizeof(string), "%s", mensagens[random1]);
SendClientMessageToAll(cores[random2],string);
return 1;
}
TIPO MANDA 3 VEZES A MENSAGEM DEPOIS MANDA A OUTRA MENSAGEM 3 VEZES
Re: ta mandando 3 vezes a mensagem depois muda -
RebeloX - 21.07.2012
Quote:
Originally Posted by Math3us
pawn Code:
new mensagens[2][256] = {"[INFO:] Quer ver comandos do server use /comandos", "[INFO:] Quer dar aquela trepada violenta use /sexo"}; new cores[] = { COLOR_ORANGE };
forward RandomMSG();
public OnGameModeInit() { SetTimer("RandomMSG",150000,1);
public RandomMSG() { new string[256]; new random1 = random(sizeof(mensagens)); new random2 = random(sizeof(cores)); format(string, sizeof(string), "%s", mensagens[random1]); SendClientMessageToAll(cores[random2],string); return 1; }
TIPO MANDA 3 VEZES A MENSAGEM DEPOIS MANDA A OUTRA MENSAGEM 3 VEZES
|
Faзa assim
pawn Code:
new RandomMSG[][] = {
"Primeira Mensagem",
"Segunda Mensagem",
"Terceira Mnesagem"
};
public OnGameModeInit(){
SetTimer("SendRandomMSG",150000,1);
}
forward SendRandomMSG();
public SendRandomMSG(){
new random1 = random(sizeof(RandomMSG));
SendClientMessageToAll(-1,RandomMSG[random1]);
return 1;
}
Re: ta mandando 3 vezes a mensagem depois muda -
Math3us - 21.07.2012
Quote:
Originally Posted by BlueX
Faзa assim
pawn Code:
new RandomMSG[][] = { "Primeira Mensagem", "Segunda Mensagem", "Terceira Mnesagem" };
public OnGameModeInit(){ SetTimer("SendRandomMSG",150000,1); }
forward SendRandomMSG(); public SendRandomMSG(){ new random1 = random(sizeof(RandomMSG)); SendClientMessageToAll(-1,RandomMSG[random1]); return 1; }
|
oks valew