Textdraw
#2

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);
}
Something like this is what I'd do, although I do not know the most efficient ways.

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.
Reply


Messages In This Thread
Textdraw - by Qur - 28.07.2012, 10:25
Re: Textdraw - by Kindred - 28.07.2012, 10:40

Forum Jump:


Users browsing this thread: 1 Guest(s)