Warning
#4

Asн estб todo hecho:


pawn Код:
//=====Detector AFK==========//
new PlayerText3D:pTextLabel[MAX_PLAYERS];
new TiempoAFK[MAX_PLAYERS];
new AFK[MAX_PLAYERS];
new cadena[50];


public OnGameModeInit()
{
      SetTimer("DetectarAFK", 60000, true);
return 1;
}

public OnPlayerUpdate(playerid)
{
    AFK[playerid] = 0;
return 1;
}

//=============Detectar AFK================//
forward DetectarAFK();
public DetectarAFK()
{
    foreach(Player, i)
    {
        if(AFK[i] == 1)
        {
            TiempoAFK[i]++;
            format(cadena, sizeof(cadena), "{FF8211}Pausado{FFFFFF} [Durante {FFFF00}%i{FFFFFF} minutos]", TiempoAFK[i]);
            pTextLabel[i] = Create3DTextLabel(cadena, 0xFFFFFFFF, 30.0, 40.0, 50.0, 40.0, 0, 0);
            Attach3DTextLabelToPlayer(pTextLabel[i], i, 0.0, 0.0, 0.5);
        }
        else
        {
            Delete3DTextLabel(pTextLabel[i]);
            TiempoAFK[i] = 0;
            AFK[i] = 1;
        }
    }
    return 1;
}
Reply


Messages In This Thread
Warning - by Metzone - 09.01.2015, 19:49
Respuesta: Warning - by jotajeda - 09.01.2015, 20:00
Respuesta: Warning - by Zume - 09.01.2015, 20:01
Re: Warning - by Metzone - 09.01.2015, 20:04
Respuesta: Warning - by Zume - 09.01.2015, 20:06
Re: Warning - by Metzone - 09.01.2015, 20:11
Respuesta: Warning - by Zume - 09.01.2015, 20:13
Re: Warning - by Metzone - 09.01.2015, 20:31
Respuesta: Warning - by Zume - 09.01.2015, 20:34
Re: Warning - by Metzone - 09.01.2015, 20:41

Forum Jump:


Users browsing this thread: 1 Guest(s)