[Ajuda] Comando gmx
#4

Cara basta vc criar um settime no comando.
PHP код:
CMD:gmx(playerid) {
    if(
playerController[playerid][playerAttrib] & ADMIN_TYPE_OWNER) {
             
GameTextForAll("Reiniciando servidor em 1 minutos!"50003);
            
SendClientMessageToAll(0xA0A0A0"GMX em 1 minutos!");
        
SetTimer("Timer_Restart_WarnPlayers"1000 60false);
        return 
true;
    } return 
false;
}
forward Timer_Restart_WarnPlayers();
public 
Timer_Restart_WarnPlayers()
{
    
GameTextForAll("Reiniciando servidor em 1 minuto!"50003);
    
SendClientMessageToAll(0xA0A0A0"GMX em 1 minuto!");
    
SetTimer("Timer_Restart_Kick"1000 60false);
    
SendRconCommand("hostname Pending Restart");
    
SendRconCommand("password senhainutil");
    return 
1;
}
forward Timer_Restart_Kick();
public 
Timer_Restart_Kick()
{
    
GameTextForAll("Servidor reiniciando: Todos os players kickados!"50003);
    for(new 
iMAX_PLAYERSi++)
        
Kick(i);
    
SetTimer("Timer_Restart_Reboot"1000 5false);
    return 
1;
}
forward Timer_Restart_Reboot();
public 
Timer_Restart_Reboot()
{
    new 
HostCommand[128];
    
SendRconCommand("gmx");
    
format(HostCommand128"hostname %s"GameModeName);
    
SendRconCommand(HostCommand);
    
SendRconCommand("password 0");
    return 
1;

Reply


Messages In This Thread
Comando gmx - by Feelipe - 27.07.2015, 23:07
Re: Comando gmx - by Thider - 27.07.2015, 23:09
Re: Comando gmx - by LockedLucas - 27.07.2015, 23:09
Re: Comando gmx - by iTakelot - 27.07.2015, 23:11
Re: Comando gmx - by matheusspohr - 27.07.2015, 23:14
Re: Comando gmx - by Feelipe - 27.07.2015, 23:32

Forum Jump:


Users browsing this thread: 2 Guest(s)