Quote:
Originally Posted by redivcram
This goes for all languages including pawn, therefore I posted it in this section.
Example:
PHP Code:
new Float:value[33];
public plugin_init()
// ...
public showValue(id)
{
client_print(id, print_chat, "Your value: %f", value[id]);
}
// ... blah some other code that include changing the var
This will print out " Your value: 0.0000000" (I don't know the exact number of zeros), now, I want to force it to print the floating value as n.n, like: 0.0 or 10.0 or 12.5 or 200.3, exactly like that... how do I manage to do that, is it possible?
|
Like This:
%.1f // One Number After Dot
%.2f // Two Number After Dot, Etc...