Fuel being set to an absurd amount instead of 100
#6

PHP код:
public SpeedoUpdate()
{
    for(new 
0;i<MAX_PLAYERS;i++)
    {
        if(
IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
        {
            new 
Float:x,Float:y,Float:z,string[24];
            new 
vid GetPlayerVehicleID(i);
            
TextDrawShowForPlayer(i,box[i]);
            
TextDrawShowForPlayer(i,speed[i]);
            
GetVehicleVelocity(vid,x,y,z);
            
format(string,sizeof(string),"Speed: %dmph\nFuel:%i",floatround(floatsqroot(((x*x)+(y*y))+(z*z))*156.666667), Fuel[vid]);
            
TextDrawSetString(speed[i], string);
        }
        if(!
IsPlayerInAnyVehicle(i))
        {
            
TextDrawHideForPlayer(i,box[i]);
            
TextDrawHideForPlayer(i,speed[i]);
        }
    }

Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)