Sscanf setting . decimal numbers?
#1

Basically for my set gravity command I need to be able to set the gravity to 0.008. How would I do this on Sscanf would it be 4 "d"s?
Reply
#2

When a number is like 0.0008, its called float. So it goes like
pawn Код:
if(sscanf(params, "f", params[0])) return SendClientMessage(playerid, -1, "Error! The parameter must be a float. (IE: /setgravity 0.0008");

EDIT: ******, why use G instead of f,F ?
Reply
#3

Thanks
Reply
#4

It seemed to completely bug up the server, I typed in 0.008 and it came up a number like 354643.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)