28.11.2012, 19:10
Right now, I've got in a 1 1/2 second timer that repeats the following code;
Is there anything better I can do in terms of efficiency?
pawn Код:
for( new e; e < MAX_ENTRANCES; e ++ )
{
if( IsPlayerInRangeOfPoint( playerid, 1.5, EntranceInfo [ e ] [ eX ], EntranceInfo [ e ] [ eY ], EntranceInfo [ e ] [ eZ ] ) && tdShown [ playerid ] == false )
{
tdShown [ playerid ] = true;
TextDrawShowForPlayer( playerid, EnterExitHelp );
}
else if( tdShown [ playerid ] == true && !IsPlayerInRangeOfPoint( playerid, 1.5, EntranceInfo [ e ] [ eX ], EntranceInfo [ e ] [ eY ], EntranceInfo [ e ] [ eZ ] ) )
{
tdShown [ playerid ] = false;
TextDrawHideForPlayer( playerid, EnterExitHelp );
}
}