12.07.2013, 16:00
Okay i got a location textdraw and a speed'o'meter textdraw now my problem is my location textdraw somehow interfears with the box of my speed'o'meter. It shows Blueberry acres of the place in the box while it is never asked to do that. This is the code at 'OnPlayerConnect'
Now here is the update timer:
And here is my speedometer box textdraw wich shows the text of the location for some reason.
But this is what happens:
Anyone any idea on why it does this weird behaviour? Thanks for anyone who helps me!
pawn Код:
//Location
APlayerData[playerid][Location] = TextDrawCreate(86.000000, 320.000000, " ");
TextDrawAlignment(APlayerData[playerid][Location], 2);
TextDrawBackgroundColor(APlayerData[playerid][Location], 255);
TextDrawFont(APlayerData[playerid][Location], 2);
TextDrawLetterSize(APlayerData[playerid][Location],0.280000, 1.100000);
TextDrawColor(APlayerData[playerid][Location], -1);
TextDrawSetOutline(APlayerData[playerid][Location], 1);
TextDrawSetProportional(APlayerData[playerid][Location], 1);
pawn Код:
public Zones_Update()
{
new zone[MAX_ZONE_NAME], string[30];
for(new i=0; i<MAX_PLAYERS; i++){
GetPlayer2DZone(i, zone, MAX_ZONE_NAME);
format(string,sizeof(string),"%s", zone);
TextDrawSetString(APlayerData[i][Location], string);
TextDrawShowForPlayer(i, APlayerData[i][Location]);}
return 1;
}
pawn Код:
//Speedometer box
SpeedBox[playerid] = TextDrawCreate(500.0, 381, " ~n~~n~~n~~n~");
TextDrawUseBox(SpeedBox[playerid], 1);
TextDrawBoxColor(SpeedBox[playerid], 0x00000066);
TextDrawTextSize(SpeedBox[playerid], 620.0, 197.0);
Anyone any idea on why it does this weird behaviour? Thanks for anyone who helps me!