Pause Text
#1

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
Reply
#2

anyone
Reply
#3

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
Reply
#4

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.
Reply
#5

Thanks, +rep
Reply
#6

lol MP2 same think i wanted to post

all the same O.o
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)