Total online time too fast
#4

pawn Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerCheckpoint(playerid, BANK_X, BANK_Y, BANK_Z, 3.0);

    zoneupdates[playerid] = 1;

    player_zone[playerid] = -1;

    if(!zoneupdate) zoneupdate = SetTimer("update_zones",1000,4);

    SetTimerEx("GameTime",1000,1,"i",playerid); // Player Total Online Time
etc...etc..

and here is the /stats cmd

pawn Код:
CMD:stats(playerid, params[]) {
    new id;
    if(sscanf(params,"d",id)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /stats <ID>");
    if (!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED, "ERROR: Player is not connected.");
    new ReturnName[MAX_PLAYER_NAME];
    GetPlayerName(id, ReturnName, sizeof(ReturnName));
    new Float:ratio=floatdiv(PlayerInfo[id][Kills], PlayerInfo[id][Deaths]);
    format(szString, 256, "%d %d %.2f", PlayerInfo[id][Kills], PlayerInfo[id][Deaths], ratio);
    format(szString, sizeof(szString), "* Player stats for %s (ID:%d)", ReturnName, id);
    SendClientMessage(playerid, COLOR_YELLOW, szString);
    format(szString, sizeof(szString), "* Admin Level > %d | VIP Level > %d | Kills > %d | Deaths > %d | (K/D): %.2f", PlayerInfo[id][AdminLevel], PlayerInfo[id][VIPLevel], PlayerInfo[id][Kills], PlayerInfo[id][Deaths], ratio);
    SendClientMessage(playerid, COLOR_YELLOW, szString);
    format(szString, sizeof(szString), "* Score > %d | Cookies > %d | Reaction Wins > %d", PlayerInfo[id][Score], PlayerInfo[id][Cookies], PlayerInfo[id][ReactionWins]);
    SendClientMessage(playerid, COLOR_YELLOW, szString);
    format(szString, sizeof(szString), "* Total Online Time: %i hours, %i minutes, and %i seconds", PlayerInfo[id][Hours], PlayerInfo[id][Minutes], PlayerInfo[id][Seconds]);
    SendClientMessage(playerid, COLOR_YELLOW, szString);
    return 1;
}
Reply


Messages In This Thread
Total online time too fast - by JEkvall95 - 13.07.2013, 11:25
Re: Total online time too fast - by SsHady - 13.07.2013, 11:27
Re: Total online time too fast - by Champ - 13.07.2013, 11:37
Re: Total online time too fast - by JEkvall95 - 13.07.2013, 12:50
Respuesta: Total online time too fast - by PHudson - 13.07.2013, 12:52
Re: Total online time too fast - by Bakr - 13.07.2013, 12:54
Re: Total online time too fast - by JEkvall95 - 13.07.2013, 12:55
Respuesta: Total online time too fast - by PHudson - 13.07.2013, 13:06
Re: Respuesta: Total online time too fast - by JEkvall95 - 13.07.2013, 13:13
Re: Respuesta: Total online time too fast - by Konstantinos - 13.07.2013, 13:45

Forum Jump:


Users browsing this thread: 1 Guest(s)