Problem TextDraw in turf
#1

When going through an area, to show you a TextDraw, as I do that?
Reply
#2

can u explain better??
Reply
#3

****** Translate is bad, what to do?
So, when passing through an area, to show me a TextDraw.
Reply
#4

Do you want TextDraw or GameText?

You can use gametext with IsPlayerInRangeOfPoint, like this.

Set a timer:
pawn Код:
new msgtimer;
forward msgtimer;
public OnGamemodeInit()
{
   msgtimer = SetTimer("msgtimer", 3000, true); // change 3000 to whatever time you want, in milliseconds
   // rest of stuff
}

public msgtimer()
{
   for(new i=0;i<MAX_PLAYERS;i++)
   {
     if(IsPlayerInRangeOfPoint(i,300,x, y, z)) // I didn't check the function order but I think its playerid, range, X coord, Y coord, Z coord.
     {
        GameTextForPlayer(i, "You are entering an area", 3000, 4); // 3000 is time and 4 is style. Check wiki for more info https://sampwiki.blast.hk/wiki/GameTextStyle
     }
   }
   return 1;
}
Sorry for any errors, I'm tired
Reply
#5

Not so, I as an example, they make a GangZone when I get into it to defend a TextDraw. And when out of it disappear.
Sorry if I expressed wrong... ****** Translate goes wrong.
Reply
#6

Quote:
Originally Posted by eXtr1kE
Not so, I as an example, they make a GangZone when I get into it to defend a TextDraw. And when out of it disappear.
Sorry if I expressed wrong... ****** Translate goes wrong.
He means that he want to enable a Textdraw when he get into an Area/Gangzone.
Reply
#7

Look we used the function IsPlayerInArea :

public IsPlayerInArea(playerid, Float:minx, Float:maxx, Float:miny, Float:maxy)
{
new Float, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if (x > minx && x < maxx && y > miny && y < maxy) return 1;
return 0;
}

I put in OnPlayerSpawn :

if(IsPlayerInArea(playerid, -1591.064, 1702.824, -1741.078, 1539.302))
{
PD = TextDrawCreate(0.0, 434.0,"Police Departament Turf.");
TextDrawFont(PD,3);
TextDrawLetterSize(PD,10,10);
TextDrawColor(PD,0xF6F6F6FF);
TextDrawSetShadow(PD,1);
TextDrawSetOutline(PD,1);
TextDrawBackgroundColor(PD,0x000FF);
TextDrawUseBox(PD,0);
return 1;
}

The problem is that nothing is seen
Reply
#8

Try to remove the textdraw and use a client side message for debugging.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)