ESC - 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: ESC (
/showthread.php?tid=423034)
ESC -
audriuxxx - 16.03.2013
Hi,
I check is player in ESC like that:
#define IsPlayerPaused(%1,%2) GetTickCount() > (LastPlayerUpdate[%1] + (%2 * 1000)) // Returns the paused time in seconds
public OnPlayerUpdate(playerid)
{
if( IsPlayerConnected( playerid ) )
{
LastPlayerUpdate[playerid] = GetTickCount();
}
}
if(IsPlayerPaused(playerid908, 1) && GetPlayerState(playerid90
!= PLAYER_STATE_SPECTATING) // 300 seconds = 5 minutes
{
print("ASD");
}
I get this print, when i press esc, but when i run or go by the car, and suddenly press ESC, when it don't work. Why?