Creating a textdraw is player is in range
#1

Hello SAMPians :P,

Is there a way to create a textdraw if player is in range of point and destroys the textdraw as soon as the player leaves the point?

If so, can you tell me how to do so, and where do I put the script at? Thanks.

Here's for example,

pawn Код:
for(new i = 0; i < MAX_STADIUMS; ++i)
{
    if(IsPlayerInRangeOfPoint(playerid, 2.0, StadiumInfo[i][sEX], StadiumInfo[i][sEY], StadiumInfo[i][sEZ]))
    {
        DefinedVar[playerid] = TextDrawCreate(85.000000, 322.000000, "Stadium Entrance, You Are At.");
        textdrawscount++;
        TextDrawAlignment(DefinedVar[playerid], 2);
        TextDrawBackgroundColor(DefinedVar[playerid], 255);
        TextDrawFont(DefinedVar[playerid], 0);
        TextDrawLetterSize(DefinedVar[playerid], 0.809998, 1.500000);
        TextDrawColor(DefinedVar[playerid], -1);
        TextDrawSetOutline(DefinedVar[playerid], 1);
        TextDrawSetProportional(DefinedVar[playerid], 1);
        TextDrawShowForPlayer(playerid, DefinedVar[playerid]);
    }
}
(P/S: The code is just for an example, it might not work :P)

So.. The part where it checks if IsPlayerInRangeOfPoint is done, but how to delete it after player isnt in it anymore?
Reply


Messages In This Thread
Creating a textdraw is player is in range - by Ahrim - 15.09.2013, 09:31
Re: Creating a textdraw is player is in range - by NeroX98 - 15.09.2013, 10:57
Re: Creating a textdraw is player is in range - by Ahrim - 15.09.2013, 10:59
Re: Creating a textdraw is player is in range - by Finn - 15.09.2013, 11:05
Re: Creating a textdraw is player is in range - by NeroX98 - 15.09.2013, 11:13
Re: Creating a textdraw is player is in range - by Ahrim - 15.09.2013, 12:07

Forum Jump:


Users browsing this thread: 1 Guest(s)