SA-MP Forums Archive
Pause Text - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Pause Text (/showthread.php?tid=303104)



Pause Text - SnG.Scot_MisCuDI - 11.12.2011

How can i make it so when someone is paused, above there head it says: Paused
I know it might have something to do with SetPlayerChatBubble but im not sure.
+rep for help


Re: Pause Text - SnG.Scot_MisCuDI - 11.12.2011

anyone


Re: Pause Text - Tigerkiller - 11.12.2011

you dont need another function.
only a verriable, timer and OnPlayerUpdate

new PlayerAFK[MAX_PLAYERS] = -1;

i give you a fs tomorrow iam gonna sleep
if you dont want to wait, use the search


Re: Pause Text - MP2 - 11.12.2011

pawn Код:
new PauseTime[MAX_PLAYERS];

public OnPlayerUpdate(playerid)
{
    PauseTime[playerid] = gettime();
    return 1;
}

public OnGameModeInit()
{
    SetTimer("pausecheck", 4321, true);
    return 1;
}

forward pausecheck();
public pausecheck()
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        new PausedSeconds = gettime()-PauseTime[i];
        if(PausedSeconds > 5) // Players that crash/take screenshots
        // are detected as being paused during that time, so I leave
        // a 5 second delay to confirm they are paused
        {
            // player 'i' is paused
            SetPlayerChatBubble(i, "Paused", COLOR_GREY, 100.0, 5000);
        }
    }
    return 1;
}
Not tested, though should work fine.


Re: Pause Text - SnG.Scot_MisCuDI - 12.12.2011

Thanks, +rep


Re: Pause Text - Tigerkiller - 12.12.2011

lol MP2 same think i wanted to post

all the same O.o