Help getting total time paused
#1

Hello guys Im trying to make a pausing sustem to detect the ammount of time that a player is paused, the ammount of minutes to be more precise.

I tried to search but I had no success so I decided to post here.

I have this at the moment.


pawn Код:
new bool:Pausing[MAX_PLAYERS];
new lastupdate[MAX_PLAYERS];
public OnPlayerUpdate(playerid)
{
    lastupdate[playerid] = GetTickCount();
    //Detecting the pause
    if(GetTickCount() > (lastupdate[i]+2000) )
    {
        SetPlayerChatBubble(i, "I'm Paused - Time:", 0x691107AA, 100.0, 1000);
    Pausing[i] = true;
    }
    else
    {
    Pausing[i] = false;
    }
    return 1;
}
I dont know if I should be using OnPlayerUpdate or not.
But yeah, what I want is to make it so the SetPlayerChatBubble shows the ammount of minutes that the player is paused.
Please help and thanks in advance.
Reply


Messages In This Thread
Help getting total time paused - by Mishima - 12.07.2012, 23:17
Re: Help getting total time paused - by [MM]RoXoR[FS] - 13.07.2012, 02:21
Re: Help getting total time paused - by Mishima - 13.07.2012, 02:43
Re: Help getting total time paused - by [MM]RoXoR[FS] - 13.07.2012, 02:51
Re: Help getting total time paused - by Mishima - 13.07.2012, 03:06

Forum Jump:


Users browsing this thread: 1 Guest(s)