CreatePlayerTextDraw problem - 2 textdraws appear in the same position -
im - 06.08.2012
Hello.
I'm trying to create 2 textdraws that will appear when player enters a car.
The problem is that both textdraws appear in the same position. The coords of the text draws are different.\
Any ideas why that happens?
Код:
stock CreateRentCarHUD(playerid){
PlayerTextDrawDestroy(playerid, RentCarHUD[playerid]);
RentCarHUD[playerid] = CreatePlayerTextDraw(playerid, 44.000000, 323.000000, "Rentcar Cost: ~g~$0");
PlayerTextDrawBackgroundColor(playerid, RentCarHUD[playerid], 255);
PlayerTextDrawFont(playerid, RentCarHUD[playerid], 3);
PlayerTextDrawLetterSize(playerid, RentCarHUD[playerid], 0.240000, 1.499999);
PlayerTextDrawColor(playerid, RentCarHUD[playerid], -1);
PlayerTextDrawSetOutline(playerid, RentCarHUD[playerid], 1);
PlayerTextDrawSetProportional(playerid, RentCarHUD[playerid], 0);
PlayerTextDrawShow(playerid, RentCarHUD[playerid]);
totalrent[playerid] = 0;
}
stock CreateFuelCarHUD(playerid){
new fuel = vehicleVariables[GetPlayerVehicleID(playerid)][vVehicleGas], str[50];
format(str, sizeof(str),"Fuel: ~g~%d %", fuel);
PlayerTextDrawDestroy(playerid, FuelCarHUD[playerid]);
FuelCarHUD[playerid] = CreatePlayerTextDraw(playerid, 44.000000, 308.000000, str);
PlayerTextDrawBackgroundColor(playerid, FuelCarHUD[playerid], 255);
PlayerTextDrawFont(playerid, FuelCarHUD[playerid], 3);
PlayerTextDrawLetterSize(playerid, FuelCarHUD[playerid], 0.410000, 1.600000);
PlayerTextDrawColor(playerid, FuelCarHUD[playerid], -1);
PlayerTextDrawSetOutline(playerid, FuelCarHUD[playerid], 1);
PlayerTextDrawSetProportional(playerid, FuelCarHUD[playerid], 1);
PlayerTextDrawShow(playerid, FuelCarHUD[playerid]);
}
Re: CreatePlayerTextDraw problem - 2 textdraws appear in the same position -
im - 08.08.2012
bump.
Re: CreatePlayerTextDraw problem - 2 textdraws appear in the same position -
CROSS_Hunter - 08.08.2012
simple look at those:
pawn Код:
RentCarHUD[playerid] = CreatePlayerTextDraw(playerid, 44.000000, 323.000000, "Rentcar Cost: ~g~$0");
pawn Код:
FuelCarHUD[playerid] = CreatePlayerTextDraw(playerid, 44.000000, 308.000000, str);
Код:
//this is repeated in both of them thats why the X location is the same in both
44.000000
Re: CreatePlayerTextDraw problem - 2 textdraws appear in the same position -
im - 08.08.2012
Yeah, but the textdraws should appear one bellow the othere, not both on the same position.
Sometimes I see one, sometimes the other.. The textdraws are updated once every few seconds.