[Pedido] Include junp
#2

Код:
#include <a_samp>

#if defined _junp_included
  #endinput
#endif

#define _junp_included

//TOPO DA GM
//Mensagem Formatada
#define SendFormatMessage(%0,%1,%2,%3) format(STRX, sizeof(STRX),%2,%3) && SendClientMessage(%0, %1, STRX)
#define SendFormatMessageToAll(%1,%2,%3) format(STRX, sizeof(STRX),%2,%3) && SendClientMessageToAll(%1, STRX)
/*Ex:
SendFormatMessage(Player, Cor, "Texto", Funзхes);
SendFormatMessageToAll(Cor, "Texto", Funзхes);
*/
#define BANS        "/Banidos/%s.ini"
new ban[40];
new stringb[128];

#define GetTime; entrou

#define entrou SendClientMessage(playerid, -1, "");
#define entrou SendClientMessage(playerid, -1, "");
#define entrou SendClientMessage(playerid, -1, "");
#define entrou SendClientMessage(playerid, -1, "");
#define entrou SendClientMessage(playerid, -1, "");
#define entrou SendClientMessage(playerid, -1, "");
#define entrou SendClientMessage(playerid, -1, "");
#define entrou SendClientMessage(playerid, -1, "");
#define entrou SendClientMessage(playerid, -1, "");
#define entrou SendClientMessage(playerid, -1, "");
#define entrou SendClientMessage(playerid, -1, "");
#define entrou SendClientMessage(playerid, -1, "");
#define entrou SendClientMessage(playerid, -1, "");
#define entrou SendClientMessage(playerid, -1, "");
#define entrou SendClientMessage(playerid, -1, "");
#define entrou SendClientMessage(playerid, -1, "");
#define entrou SendClientMessage(playerid, -1, "");
#define entrou SendClientMessage(playerid, -1, "");

stock timec(timestamp, compare = -1) {
    if (compare == -1) {
        compare = gettime();
    }
    new
        n,
        // on the following line, I have removed the need for the diff() function.
        // if you want to use the diff() function in pawn, replace the following with:
        // Float:d = diff(timestamp, compare),
        Float:d = (timestamp > compare) ? timestamp - compare : compare - timestamp,
        returnstr[32];
    if (d < 60) {
        format(returnstr, sizeof(returnstr), "1 Minuto");
        return returnstr;
    } else if (d < 3600) { // 3600 = 1 hour
        n = floatround(floatdiv(d, 60.0), floatround_floor);
        format(returnstr, sizeof(returnstr), "Minuto");
    } else if (d < 86400) { // 86400 = 1 day
        n = floatround(floatdiv(d, 3600.0), floatround_floor);
        format(returnstr, sizeof(returnstr), "Hora");
    } else if (d < 2592000) { // 2592000 = 1 month
        n = floatround(floatdiv(d, 86400.0), floatround_floor);
        format(returnstr, sizeof(returnstr), "Dia");
    } else if (d < 31536000) { // 31536000 = 1 year
        n = floatround(floatdiv(d, 2592000.0), floatround_floor);
        format(returnstr, sizeof(returnstr), "Mes");// O mes n da pa arruma, se for 2 mes fica 2Mess se for 1 fica 1Mes '-'
    } else {
        n = floatround(floatdiv(d, 31536000.0), floatround_floor);
        format(returnstr, sizeof(returnstr), "Anos");
    }
    if (n == 1) {
        format(returnstr, sizeof(returnstr), "1 %s", returnstr);
    } else {
        format(returnstr, sizeof(returnstr), "%d %ss", n+1, returnstr);
    }
    return returnstr;
}
Reply


Messages In This Thread
Include junp - by GabrielMT - 20.01.2018, 01:53
Re: Include junp - by DelK - 20.01.2018, 14:26
Re: Include junp - by GabrielMT - 20.01.2018, 19:08

Forum Jump:


Users browsing this thread: 1 Guest(s)