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



Reiniciar Servidor leia - GuiKommander - 21.02.2017

Bom tava tentando fazer esse sistema de reiniciar server
if( !strcmp( cmd, "/gmxsv", true ))
{
//if( aInfo[ playerid][ Gerente ] == 1 ) return SendClientMessage(playerid, COLOR_ERRO, "| ERRO | Comando invбlido");
SendClientMessageToAll( 0xCDB38BFF, "| INFO | Servidor sendo reiniciado em 2 Minutos!" );
GameTextForPlayer(playerid, "~w~2 Minutos!", 3000, 3);
SetTimer("Atualizar", 10000, false);
{
SendRconCommand("exit");
SendClientMessageToAll(0xCDB38BFF, "| INFO | Servidor reiniciado voltamos jб!");
}
return 1;
}
forward Atualizar();
public Atualizar()
{
return 1;
}
Porйm Eu quero que ele reinicia em 10 Segundos. quando eu dou o comando ele Reinicia na hora e nгo chama o Timer para reiniciar em 10 Seg.
Quem ajuda??


Re: Reiniciar Servidor leia - henriqueTL - 21.02.2017

PHP код:
    if(strcmp(cmd"/gmx"true) == 0)
    {
        if( 
aInfoplayerid][ Gerente ] == )
        {
            if(
Contandogmx 0) return SCM(playeridCOR_ERRO"[ERRO] O servidor jб estб sendo reiniciado.");
            new 
String[200];
            
format(Stringsizeof(String), "O Servidor estб sendo reiniciado pelo %s %s. Nгo saia do servidor!"AccountName(playerid), getPName(playerid));
            
SCMToAll(0xFFFFFFFF ,String);
            
Contandogmx 5;
            
SetTimer("ReiniciandoEm"1000true);
        }
        else 
SCM(playeridCOR_CMD"[ERRO] Vocк nгo tem permissгo para usar este comando!");
        return 
1;
    } 



Re: Reiniciar Servidor leia - IlanZ - 21.02.2017

PHP код:
if( !strcmpcmd"/gmxsv"true ))
{
    
//if( aInfo[ playerid][ Gerente ] == 1 ) return SendClientMessage(playerid, COLOR_ERRO, "| ERRO | Comando invбlido");
    
SendClientMessageToAll0xCDB38BFF"| INFO | Servidor sendo reiniciado em 2 Minutos!" );
    
GameTextForPlayer(playerid"~w~2 Minutos!"30003);
    
SetTimer("Atualizar"10000false);
    return 
1;
{
forward Atualizar();
public 
Atualizar()
{
    
SendRconCommand("gmx");
    return 
1;




Re: Reiniciar Servidor leia - GuiKommander - 21.02.2017

valeu Ilan ! <3