[Ajuda] Problema
#1

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?
Reply
#2

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;

Reply
#3

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?
Reply
#4

//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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)