Posts: 7
Threads: 3
Joined: Dec 2009
Reputation:
0
I want to know how to do so when you tighten ESC in the game show "Pause" as in partyserver.
In the list of keys of samp ESC button does not appear, then I want to know another way to do it.
I am using a translator.
TheInnocentOne
Unregistered
The ESC button cannot be detected with a press.
There are other ways to detect when a player has paused.
TheInnocentOne
Unregistered
Quote:
Originally Posted by Carlton
pawn Код:
new PausedTimer;
public OnGameModeInit() { PausedTimer = SetTimer("CheckPaused", 1000, 1); return 1; }
forward CheckPaused(); public CheckPaused() { for(new o = 0; o < GetMaxPlayers(); o++ ){ if(GetPVarInt(o, "Paused") == 0) { // The player is paused / Pressed ESC. } } return 1; }
public OnPlayerConnect(playerid) { SetPVarInt(playerid, "Paused", 0); return 1; }
public OnPlayerUpdate(playerid) { SetPVarInt(playerid, "Paused", 1); return 1; }
|
OnPlayerUpdate is NOT called for paused players..
So why are you setting them as paused there?
TheInnocentOne
Unregistered
You don't have the latest server package with the 0.3 includes.
Download them:
http://files.sa-mp.com/samp03asvr_R7_win32.zip
Posts: 2,862
Threads: 11
Joined: Mar 2008
Reputation:
0
@Carlton,
Oh my god, what a fail.
@_0wn3r_ ,
Check ******' YUP for proper detection of paused players.