SA-MP Forums Archive
[DUV]Timer - 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: [DUV]Timer (/showthread.php?tid=169806)



[DUV]Timer - BiieL - 20.08.2010

Bom, estava tentando criar uns timers para poder setar o nome do server diferente a cada 5 segundos, CMD:
pawn Код:
forward SendMSG();

new RandomMSG[][] =
{
    "Teste 1 [WinG]• Paraquedismo Brasil •[BasE]",
    "Teste 2"
};

OnGameModeInit

SetTimer("SendMSG", 5000, true);

Fora de tudo:

public SendMSG()
{
    new string[256];
    //new random2 = random(sizeof(RandomColors));
    new randMSG = random(sizeof(RandomMSG));
    //SendClientMessageToAll(RandomColors[random2], RandomMSG[randMSG]);
    format(string,sizeof(string),"Hostname: %s",RandomMSG[randMSG]);
    SendRconCommand(string);
}
Mas nгo funciona, ele continua com o nome que foi definido no server.cfg, nгo sei porque nao funciona, o que hб de errado ?

Se for pra responder "Nгo sei", faz um favor, nem posta


Re: [DUV]Timer - zSuYaNw - 20.08.2010

Nгo Bote: Hostname: bote sу hostname.

pawn Код:
forward SendMSG();

new RandomMSG[][] =
{
    "Teste 1 [WinG]• Paraquedismo Brasil •[BasE]",
    "Teste 2"
};

OnGameModeInit

SetTimer("SendMSG", 5000, true);

Fora de tudo:

public SendMSG()
{
    new string[256];
    //new random2 = random(sizeof(RandomColors));
    new randMSG = random(sizeof(RandomMSG));
    //SendClientMessageToAll(RandomColors[random2], RandomMSG[randMSG]);
    format(string,sizeof(string),"hostname %s",RandomMSG[randMSG]);
    SendRconCommand(string);
}



Re: [DUV]Timer - BiieL - 21.08.2010

Valeu Garfield, funfou, agora estб mostrando como se fosse em um host e a cada 5 segundos muda o hostname, bom isso, gostei, CLOSED