Float decimal restriction - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Float decimal restriction (
/showthread.php?tid=452263)
Float decimal restriction -
Mauricee - 20.07.2013
How can I put a restriction to set only one decimal to a float number.
If I enter: 100.2 to return 1 and if I enter: 100.22 to return an error.
Respuesta: Float decimal restriction -
Xabi - 20.07.2013
%.1f -> This will allow just 1 decimal.
Re: Float decimal restriction -
Mauricee - 20.07.2013
I can use it with sscanf ?