[Ajuda] /presos com tempo aproximado
#3

Duvida simples, mas jб que ninguйm entrou em contato...

Code:
pawn Код:
if(strcmp(cmd, "/presosadm", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        SendClientMessage(playerid, COLOR_WHITE, "|______________[ Presos pelo Admin]______________|");
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i))
            {
                if(PlayerInfo[i][pJailed] == 6)
                {
                    new int_min = PlayerInfo[i][pJailTime] / 60;
                    new int_seg = PlayerInfo[i][pJailTime] % 60;
                    GetPlayerName(i, sendername, sizeof(sendername));
                    format(string, 128, "ID : %d Preso: %s Local : Cadeia Admin - Tempo : %d seg, aprox %d min.", i, sendername, PlayerInfo[i][pJailTime], (int_seg > 30 ? (int_min+1):(int_min)));
                    SendClientMessage(playerid, COLOR_GRAD2, string);
                }
            }
        }
    }
    return true;
}
Caso nгo funcione corretamente vocк pode voltar aqui que eu dou uma olhada, nгo tive como testar...

@EDIT
fiz da forma que o iLase exemplificou tambйm:
pawn Код:
new int_min = PlayerInfo[i][pJailTime] / 60;
new int_seg = PlayerInfo[i][pJailTime] % 60;
GetPlayerName(i, sendername, sizeof(sendername));
format(string, 128, "ID : %d Preso: %s Local : Cadeia Admin - Tempo : %d:%02d seg, aprox %d min.", i, sendername, int_min, int_seg);
SendClientMessage(playerid, COLOR_GRAD2, string);
caso seja isso.
Reply


Messages In This Thread
/presos com tempo aproximado - by NuTShoT - 27.06.2013, 19:20
Re: /presos com tempo aproximado - by Krisky_ - 27.06.2013, 20:33
Re: /presos com tempo aproximado - by WLSF - 27.06.2013, 20:33
Re: /presos com tempo aproximado - by Kmatsu - 27.06.2013, 20:33
Re: /presos com tempo aproximado - by NuTShoT - 30.06.2013, 14:22

Forum Jump:


Users browsing this thread: 1 Guest(s)