Looking for a pause system -
Incog_Nito - 18.04.2012
I can't seem to find exactly what I'm looking for though.
What I'm looking for is a way to show a text label on someone who is paused (like "BRB... Pausing").
I want that label to show for a period of seconds and then the player disappears until they unpause.
I found several AFK systems but AFK doesn't necessarily mean PAUSED. I don't want to detect inactivity. I want to detect ESC/PAUSED.
I want the label to show up immediately when the player pauses and then (after about 3-4 seconds) I want the player to become invisible to others until they unpause.
AW: Looking for a pause system -
BigETI - 18.04.2012
Count with a timer the times a player doesn't call OnPlayerUpdate. in OPU reset the count variable to zero.
If the variable is higher than an amount you like then you can indicate them as AFK. Use Create3DTextLabel and Attach3DTextLabelToPlayer for the text label thingy. again a check in your timer (if you think the player is AFK about 3-4 minutes set their virtual world to a different one to make them hide from another player). If they return back (OPU gets called directly) then you can change their world back and also remove the text label with Delete3DTextLabel.
Re: AW: Looking for a pause system -
Incog_Nito - 18.04.2012
Quote:
Originally Posted by BigETI
Count with a timer the times a player doesn't call OnPlayerUpdate. in OPU reset the count variable to zero.
If the variable is higher than an amount you like then you can indicate them as AFK. Use Create3DTextLabel and Attach3DTextLabelToPlayer for the text label thingy. again a check in your timer (if you think the player is AFK about 3-4 minutes set their virtual world to a different one to make them hide from another player). If they return back (OPU gets called directly) then you can change their world back and also remove the text label with Delete3DTextLabel.
|
I have no idea how to do all that. LOL
Also its not minutes I want. Its seconds.
Re: Looking for a pause system -
Shetch - 18.04.2012
My signature.
Re: Looking for a pause system -
Incog_Nito - 18.04.2012
Your FS does everything I want as stated above?
Re: Looking for a pause system -
Shetch - 18.04.2012
It doesn't make the player dissapear, but it creates a label on a player that is AFK. Also there is a 3D text label on the player's head with the seconds that the player has spent AFK.
Re: Looking for a pause system -
Incog_Nito - 18.04.2012
Quote:
Originally Posted by Shetch
It doesn't make the player dissapear, but it creates a label on a player that is AFK. Also there is a 3D text label on the player's head with the seconds that the player has spent AFK.
|
Any way you could give me some code to make the player disappear?
Re: Looking for a pause system -
Shetch - 18.04.2012
Just save the player's possition to a variable.
Код:
new playerPos[MAX_PLAYERS][3];
TogglePlayerSpectating(playerid, true); // dunno if it will make the player dissapear.
GetPlayerPos(playerid, playerPos[playerid][0], playerPos[playerid][1], playerPos[playerid][2]); // When the player goes afk.
SetPlayerPos(playerid, playerPos[playerid][0], playerPos[playerid][1], playerPos[playerid][2]); // when the player come back from afk.
TogglePlayerSpectating(playerid, false);
Re: Looking for a pause system -
Incog_Nito - 18.04.2012
Quote:
Originally Posted by Shetch
Just save the player's possition to a variable.
Код:
new playerPos[MAX_PLAYERS][3];
TogglePlayerSpectating(playerid, true); // dunno if it will make the player dissapear.
GetPlayerPos(playerid, playerPos[playerid][0], playerPos[playerid][1], playerPos[playerid][2]); // When the player goes afk.
SetPlayerPos(playerid, playerPos[playerid][0], playerPos[playerid][1], playerPos[playerid][2]); // when the player come back from afk.
TogglePlayerSpectating(playerid, false);
|
Where does that go exactly?