26.03.2010, 11:06
Hello, i am encountering a problem with a semi-fuel system which i can't figure out why it's not working!
When i get in a car the box appears, but the texts not appearing.. i really need help!
When i get in a car the box appears, but the texts not appearing.. i really need help!
pawn Код:
public CheckStatus()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerInAnyVehicle(i))
{
if(TextShow[i] == false)
{
TextDrawShowForPlayer(i, Text:Black0);
TextDrawShowForPlayer(i, Text:Black1);
TextDrawShowForPlayer(i, Text:Black2);
TextDrawShowForPlayer(i, Text:Black3);
TextDrawShowForPlayer(i, Text:LightBlack);
TextShow[i] = true;
}
new String[128];
new Float:X, Float:Y, Float:Z, Float:Speed;
new vehicle = GetPlayerVehicleID(i);
GetVehicleVelocity(GetPlayerVehicleID(i), X, Y, Z);
Speed = floatmul(floatsqroot(floatadd(floatadd(floatpower(X, 2), floatpower(Y, 2)), floatpower(Z, 2))), 100.0);
format(String,sizeof(String),"~b~ D-Board~n~~r~Fuel: ~w~%i~n~~r~km/h: ~w~%i", Gas[vehicle], floatround(Speed, floatround_floor));
if(VHSCreated[i] == true)
{
TextDrawDestroy(VHS[i]);
}
VHS[i] = TextDrawCreate(541.000000,137.000000,String);
TextDrawAlignment(VHS[i],0);
TextDrawBackgroundColor(VHS[i],0x000000ff);
TextDrawFont(VHS[i],1);
TextDrawLetterSize(VHS[i],0.299999,1.000000);
TextDrawColor(VHS[i],0xffffffff);
TextDrawSetOutline(VHS[i],1);
TextDrawSetProportional(VHS[i],1);
TextDrawSetShadow(VHS[i],1);
TextDrawShowForPlayer(i, VHS[i]);
VHSCreated[i] = true;
}
else
{
if(TextShow[i] == true)
{
TextDrawHideForPlayer(i, Text:Black0);
TextDrawHideForPlayer(i, Text:Black1);
TextDrawHideForPlayer(i, Text:Black2);
TextDrawHideForPlayer(i, Text:Black3);
TextDrawHideForPlayer(i, Text:LightBlack);
TextDrawHideForPlayer(i, Text:VHS[i]);
TextShow[i] = false;
}
}
}
}
}