Speedo Help
#5

EDIT: Same error



heres the code. It uses a timer under OnGameModeInit
pawn Код:
public UpdateSpeedoMeter()
{
        for(new playerid; playerid < GetMaxPlayers(); playerid++ )
        {
            if(IsPlayerInAnyVehicle(playerid))
            {
                new Float:vVelocity[3], string[200];
                GetVehicleVelocity(GetPlayerVehicleID(playerid), vVelocity[0], vVelocity[1], vVelocity[2]);
                new Float: vSpeed = floatsqroot(floatpower(vVelocity[0], 2) + floatpower(vVelocity[1], 2) + floatpower(vVelocity[2], 2)) * 99;
                format(string, sizeof(string), "MPH: %f", vSpeed);
                Speedo[playerid] = TextDrawCreate(497 ,397 , string);
                TextDrawShowForPlayer(playerid, Speedo[playerid]);
            }
        }
}
Reply


Messages In This Thread
Speedo Help - by futuretrucker - 07.06.2011, 22:53
Re: Speedo Help - by StilThere - 07.06.2011, 23:09
Re: Speedo Help - by futuretrucker - 07.06.2011, 23:13
Re: Speedo Help - by StilThere - 07.06.2011, 23:22
Re: Speedo Help - by futuretrucker - 07.06.2011, 23:23
Re: Speedo Help - by Sznupek - 08.06.2011, 06:57
Re: Speedo Help - by StilThere - 08.06.2011, 10:39
Re: Speedo Help - by Babul - 08.06.2011, 13:32
Re: Speedo Help - by StilThere - 08.06.2011, 19:37

Forum Jump:


Users browsing this thread: 1 Guest(s)