16.03.2013, 12:04
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?
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?