Forum
Search
Members
Help
Hello There, Guest!
Login
Username:
Password:
Lost Password?
Remember me
SA-MP Forums Archive
SA-MP Scripting and Plugins
Scripting Help
Threaded Mode
Need format formula, for custom float
aLTeR
Little Clucker
Posts: 31
Threads: 9
Joined: Aug 2013
Reputation:
0
#1
25.09.2013, 17:54
I need to format float (for example 456.08 to 000456.08, 632.8 to 000632.80)
Find
Reply
TonyII
Huge Clucker
Posts: 342
Threads: 64
Joined: Aug 2013
Reputation:
0
#2
25.09.2013, 18:04
What do you mean, like this?
pawn Код:
new
Float
:
X,
Float
:
Y,
Float
:
Z;
format
(
string,
sizeof
(
string
)
,
"000%f 000%f 000%f"
, X,Y,Z
)
;
Find
Reply
aLTeR
Little Clucker
Posts: 31
Threads: 9
Joined: Aug 2013
Reputation:
0
#3
25.09.2013, 18:05
No, something like %02d
Find
Reply
Konstantinos
Spam Machine
Posts: 11,827
Threads: 33
Joined: Dec 2011
Reputation:
0
#4
25.09.2013, 18:05
Using:
pawn Код:
%
06f
makes it like that you want. However, if you want to add the last to digits (after dot) to 2 digits, that might work.
pawn Код:
%
06.2f
From a test, it works but I don't know if it's used like that.
Find
Reply
aLTeR
Little Clucker
Posts: 31
Threads: 9
Joined: Aug 2013
Reputation:
0
#5
25.09.2013, 18:07
Thanks Konstantinos.
Find
Reply
«
Next Oldest
|
Next Newest
»
View a Printable Version
Forum Jump:
Private Messages
User Control Panel
Who's Online
Search
Forum Home
SA-MP
-- News and Updates
-- General
-- Client Support
-- Bug Reports
-- Screenshots and Videos
SA-MP Server
-- Server Support
-- Server Advertisements
SA-MP Scripting and Plugins
-- Scripting Help
---- Tutorials
---- Discussion
---- Help Archive
-- Gamemode Scripts
-- Filterscripts
---- Includes
---- Tools and Files
---- Maps
-- Plugin Development
SA-MP DL Edition
-- SA-MP 0.3.DL
---- Model Releases
Other
-- Everything and Nothing
Non-English
-- Languages
---- Nederlands/Dutch
------ Scripting Showroom en Discussie
------ Off topic
---- Español/Spanish
------ Lanzamientos/Releases
---- Français/French
------ Showroom
---- Русский/Russian
------ Релизы/Releases
---- Português/Portuguese
------ Lançamentos/Releases
---- Română/Romanian
------ Salonul Scripturilor
---- Archive
Users browsing this thread: 1 Guest(s)
SA-MP Forums Archive
SA-MP Scripting and Plugins
Scripting Help