Speedometer.....
#1

Why, when i enter car, i didnt see any speedo textdraw? Speedometer using timer...

SetTimer("SPEEDO", 1000, true);

and..

pawn Код:
public SPEEDO()
{
foreach(Player, ID)
{
if(IsPlayerInAnyVehicle(ID))
{
        new MasinosID = GetPlayerVehicleID(ID);
Stringas[71];
new Float:vX, Float:vY, Float:vZ, Float:Speed;
GetVehicleVelocity(GetPlayerVehicleID(ID), vX, vY, vZ);
Speed = floatmul(floatsqroot(floatadd(floatadd(floatpower(vX, 2), floatpower(vY, 2)),  floatpower(vZ, 2))), 100.0);
if(MasinosID == BMX || MasinosID == MTBIKE || MasinosID == BIKE)
{
format(Stringas,35,"~w~Greitis KM/H: ~y~%i~n~",aVehicleNames[GetVehicleModel(GetPlayerVehicleID(ID))-400], floatround(Speed, floatround_floor));
TextDrawSetString(VHS[ID], Stringas[ID]);
}
else
{
format(Stringas,70,"~w~Greitis KM/H: ~y~%i~n~~w~Degalai: ~y~%iL~n~",floatround(Speed, floatround_floor),vehicleDB[GetPlayerVehicleID(ID)][gas]);
TextDrawSetString(VHS[ID], Stringas[ID]);
}
}
}
return 1;
}
ongamemodeinit:

LoadTD();

than..
pawn Код:
KrautiTextDrawus()
{
    foreach(Player, i)
    {
        VHS[i] = TextDrawCreate(495.000000,122.000000,"0");
        TextDrawAlignment(VHS[i], 0);
        TextDrawBackgroundColor(VHS[i], 0x000000ff);
        TextDrawFont(VHS[i], 1);
        TextDrawLetterSize(VHS[i], 0.299999,1.000000);
        TextDrawColor(VHS[i], 0xCCA129FF);
        TextDrawSetOutline(VHS[i], 0);
        TextDrawSetProportional(VHS[i], 1);
        TextDrawSetShadow(VHS[i], 1);
        TextDrawShowForPlayer(i, VHS[i]);
    }
    return 1;
}
Reply


Messages In This Thread
Speedometer..... - by Gh0sT_ - 13.11.2010, 09:10
Re: Speedometer..... - by Gh0sT_ - 14.11.2010, 08:54
Re: Speedometer..... - by SampStunta - 14.11.2010, 09:00
Re: Speedometer..... - by Gh0sT_ - 14.11.2010, 11:51
Re: Speedometer..... - by dark_clown - 14.11.2010, 11:53
Re: Speedometer..... - by Gh0sT_ - 14.11.2010, 12:20
Re: Speedometer..... - by SampStunta - 14.11.2010, 19:30
Re: Speedometer..... - by Mean - 14.11.2010, 19:52
Re: Speedometer..... - by SampStunta - 14.11.2010, 21:32

Forum Jump:


Users browsing this thread: 1 Guest(s)