Speedometer not working. (Screenshots)
#3

Try debugging it in public SpeedoUpdate(playerid) (assuming that Fuel TD is updated succesfully here):
pawn Код:
// ...
            format(string,sizeof(string),"~g~Speed: ~w~%d mph",floatround(floatsqroot(((x*x)+(y*y))+(z*z))*156.666667*0.641371192));
            printf("[-Debug-] New Speed string for TextDraw ID # %d: [%d]'%s'", speed[playerid], strlen(string), string);
            TextDrawSetString(speed[playerid],string)
            format(string,sizeof(string),"~g~Fuel: ~w~%d%%",VehFuel[vehicleid]);
            TextDrawSetString(fuel[playerid],string);
            TextDrawShowForPlayer(playerid,fuel[playerid]);
            TextDrawShowForPlayer(playerid,speed[playerid]);
    }
}
Check if the TextDraw ID is valid and if not please check what can compromise your speed variable and if you think you are getting over the Global TextDraw Limit, have a look at Player TextDraws.

If you can not determine the problem with these instructions, and you think the debug message contains correct informations about the TextDraw ID and the string, please post here your whole FuelUpdate function.

Edit: public functions like SpeedoUpdate must return a value, altough this cannot be associated with the problem.
Reply


Messages In This Thread
Speedometer not working. (Screenshots) - by Dokins - 12.09.2012, 17:24
Re: Speedometer not working. (Screenshots) - by Dokins - 14.09.2012, 17:18
Re: Speedometer not working. (Screenshots) - by KoczkaHUN - 14.09.2012, 23:49

Forum Jump:


Users browsing this thread: 1 Guest(s)