[Include] iUtils
#1

[I]
Funзхes
pawn Код:
Now(), TimeStamp() ou iGetTimeStamp();

IsNumeric(string[]) - Verifica se й numerico ou nгo e retorna true ou false;

GetIP(playerid) - Pega o IP do Jogador;

GetPlayerNameEx(playerid) - Pega o Nick do Jogador.
Cуdigo:
pawn Код:
/*
 * --- iUtils ---
 * Por DanDRT(Danilo Galvгo)
 * Agradecimentos: Willian.
 * [iPs]TeaM - ipsbr.net
 * CODE.ME
*/

 
#define Now       iGetTimeStamp
#define TimeStamp iGetTimeStamp
 
stock IsNumeric(const string[])
{
        for (new i = (string[0] == 0x2D && string[1] ? 1 : 0),j = strlen(string); i < j; i++)
        {
                if (string[i] > 0x39 || string[i] < 0x30) return false;
        }
        return true;
}
 
stock iGetTimeStamp()
{
    new time[6], february, finaltime;
    gettime(time[0], time[1], time[2]);
    getdate(time[3], time[4], time[5]);
 
    february = (!((time[3] % 4) ^ 2) ? 29 : 28);
 
    if(!(february ^ 28))
        finaltime = 86400;
 
    finaltime += 27053635+(time[2] + (time[1] * 60) + (time[0] * 3600))+(((31*7)+(30*4)+february)+(time[5] * 86400) + (31536000 * (time[3]-1970)));
 
    return finaltime;
}
 
stock GetIP(playerid)
{
    new Ip[16];
    GetPlayerIp(playerid, Ip, sizeof(Ip));
    return Ip;
}
 
stock GetPlayerNameEx(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    return name;
}
[/i][/i]

ou PasteBin.

Crйditos
pawn Код:
/*
 * --- iUtils ---
 * Por DanDRT(Danilo Galvгo)
 * Agradecimentos: Willian.
 * [iPs]TeaM - ipsbr.net
*/


Ps: vou procurar adicionar mais funзхes ao decorrer do tempo.
Reply


Messages In This Thread
iUtils - by DanDRT - 28.11.2013, 17:04
Re: iUtils - by 22 - 28.11.2013, 17:06
Re: iUtils - by Juniiro3 - 28.11.2013, 17:11
Re: iUtils - by Ph0ton - 28.11.2013, 17:17
Respuesta: Re: iUtils - by DanDRT - 28.11.2013, 17:20
Re: iUtils - by Coe1 - 28.11.2013, 17:21
Re: iUtils - by Juniiro3 - 28.11.2013, 17:24
Re: Respuesta: Re: iUtils - by Ph0ton - 28.11.2013, 17:32
Re: Respuesta: Re: iUtils - by Coe1 - 28.11.2013, 17:36
Re: Respuesta: Re: iUtils - by Ph0ton - 28.11.2013, 18:01

Forum Jump:


Users browsing this thread: 3 Guest(s)