28.07.2012, 10:40
pawn Код:
new InPoint[MAX_PLAYERS];
if(IsPlayerInRangeOfPoint(playerid, 6, PosX, PosY, PosZ) && InPoint[playerid] != 1)
{
ShowTextDrawStock(playerid);
InPoint[playerid] = 1;
return 1;
}
if(InPoint[playerid] == 1)
{
InPoint[playerid] = 0;
HideTextDrawStock(playerid);
}
stock ShowTextDrawStock(playerid)
{
TextDrawShowForPlayer(playerid, textdrawidhere);
}
stock HideTextDrawStock(playerid)
{
TextDrawHideForPlayer(playerid, textdrawidhere);
}
Then I'd place the if statements inside a player timer that is close to 1 second, or just OnPlayerUpdate.
Hope I helped.
PS: The InPoint variable is there to prevent the stock from being used every second, seeing as it would be very inefficient to call a stock every second or few times a second with 10+ players online.