06.06.2013, 17:23
hi guys am trying to move the speedo box on the right an side i can get the box on the rigth an side but the text saying fuel and speed i cant move it
here is a photo anyways http://i.imgur.com/Tkq8Nbq.jpg
well here is the code if you have any ideas what can i do?
here is a photo anyways http://i.imgur.com/Tkq8Nbq.jpg
well here is the code if you have any ideas what can i do?
Код:
public Speedometer()
{
new vehicleid, Float:health;
new engine, lights, alarm, doors, bonnet, boot, objective;
new fstring[32], string[512];
for(new i=0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
{
vehicleid = GetPlayerVehicleID(i);
GetVehicleHealth(vehicleid, health);
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
strcat(string, "~n~~b~~h~health: ~g~", sizeof(string));
fstring = "iiiiiiiiii";
if(health > 1000.0) strins(fstring, "~r~", 10, sizeof(fstring));
else if(health < 0.0) strins(fstring, "~r~", 0, sizeof(fstring));
else strins(fstring, "~r~", floatround(health/100.0), sizeof(fstring));
strcat(string, fstring, sizeof(string));
strcat(string, " ~b~~h~fuel: ~g~", sizeof(string));
fstring = "iiiiiiiiii";
if(Fuel[vehicleid] > 100.0) strins(fstring, "~r~", 10, sizeof(fstring));
else if(Fuel[vehicleid] < 0.0) strins(fstring, "~r~", 0, sizeof(fstring));
else strins(fstring, "~r~", floatround(Fuel[vehicleid]/10.0), sizeof(fstring));
strcat(string, fstring, sizeof(string));
TextDrawSetString(SpeedoText[i], string);
}
}
}
Код:
SpeedoText[playerid] = TextDrawCreate(180.000, 362.000," ");
TextDrawAlignment(SpeedoText[playerid], 1);
TextDrawFont(SpeedoText[playerid],2);
TextDrawLetterSize(SpeedoText[playerid], 0.310, 1.400);
TextDrawSetShadow(SpeedoText[playerid],0);
TextDrawUseBox(SpeedoText[playerid], 1);
TextDrawBoxColor(SpeedoText[playerid], 0x99);
TextDrawTextSize(SpeedoText[playerid], 520.000, 0.000);

