SA-MP Forums Archive
[Ajuda] Problema - 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] Problema (/showthread.php?tid=639599)



Problema - CezarBR - 20.08.2017

Olб amigos e amigas, bom eu fiz o seguinte Script:

Quote:

#include <a_samp>

new NomesServer[2][39] =
{
"Nome do Servidor | Versгo Beta: 1.0",
"Nome do Servidor | Servidor Oficial !"
};

forward OnServerHostName();

public OnGameModeInit()
{
SetTimerEx("OnServerHostName", 1000, true, "s");

return 1;
}

public OnServerHostName()
{
new RandomNomes = random(sizeof(NomesServer)), sHostName[58];

format(sHostName, sizeof(sHostName), "hostname %s", NomesServer[RandomNomes]);
SendRconCommand(sHostName);
}

Compilou sem nenhum Erro !, servidor ligou com esse script rodando...

Em Seguida eu baixei a YSI

Coloquei a include que eu queria no script:
Quote:

#include <YSI\y_commands>

Em Seguida fiz um comando simples !
Quote:

YCMD:teste(playerid, params[], help)
{
SendClientMessage(playerid, -1, "Testado!");
return 1;
}

Compilou sem nenhum Erro !, e o servidor nгo ligou -;. Alguma soluзгo para esse problema?


Re: Problema - GuilhermeNunes - 20.08.2017

PHP код:
YCMD:oi(playeridparams[], help)
{
    if(
help)
        return 
SendClientMessage(playerid, -1"qualquer coisa");
    
SendClientMessage(playerid, -1"Testado");
    return 
1;

ou

PHP код:
YCMD:ola(playeridparams[], help)
{
    
SendClientMessage(playerid, -1"testado");
    return 
1;




Re: Problema - CezarBR - 20.08.2017

Quote:
Originally Posted by GuilhermeNunes
Посмотреть сообщение
PHP код:
YCMD:oi(playeridparams[], help)
{
    if(
help)
        return 
SendClientMessage(playerid, -1"qualquer coisa");
    
SendClientMessage(playerid, -1"Testado");
    return 
1;

ou

PHP код:
YCMD:ola(playeridparams[], help)
{
    
SendClientMessage(playerid, -1"testado");
    return 
1;

Nei й o comando, eu tirei o script de mudar o nome do servidor e o servidor ligou :/. serб porque?


Re: Problema - zCyan - 20.08.2017

//Topo gm

Код:
forward SendMSG();
Код:
new RandomServerName[3][] =
{
    "Nome servidor 1",
    "Nome servidor 2",
    "Nome servidor 3 "
};
//GameModeInit

Код:
SetTimer("SendMSG", 1000, true);
//Final gm

Код:
public SendMSG()
{
    new string[128];
    new randMSG = random(sizeof(RandomServerName));
    format(string,sizeof(string),"hostname %s",RandomServerName[randMSG]);
    SendRconCommand(string);
    return 1;
}
Espero ter ajudado