Quote:
Originally Posted by mprofitt
Quote:
Originally Posted by Roban[swe
]
Some problem whits writing out decimal in a textdraw.. I have made a drag race counter but it only show the whole seconds and not the comma. Example instead of 10.6 it's show 10 only-_- Here is the code:
Код:
new Float:precord[MAX_PLAYERS];
public timerrec()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(inrace[i] == 2)
{
precord[i] = precord[i] + 0.1;
TextDrawHideForPlayer(i,Textdrawbomb[i]);
format(strnh, sizeof(strnh), "Time:%d",floatround(precord[i]));
TextDrawSetString(Textdrawbomb[i],strnh);
TextDrawShowForPlayer(i,Textdrawbomb[i]);
}
}
}
return 1;
}
|
Try this....
Код:
format(strnh, sizeof(strnh), "Time:%f",floatround(precord[i]));
|
Tanks it's works but it stands 10:500009 insted of 10.5 how to fix this?