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
Linear Mode
Formatting number.
HY
Gangsta
Posts: 540
Threads: 107
Joined: Sep 2014
Reputation:
0
#4
26.02.2015, 17:08
Quote:
Originally Posted by
Banana_Ghost
You can format it by replacing %d or %i with %08d of %08i.
Edit, above poster was faster, even more detailed.
Quote:
Originally Posted by
Schneider
%09d
Will give a number with 9 digits.
for example:
pawn Код:
new
number
=
312
;
new
str
[
24
]
;
format
(
str,
sizeof
(
str
)
,
"Number: %08d"
, number
)
;
print
(
str
)
;
..will print: "Number: 00000312"
Thanks, both.
Find
Reply
«
Next Oldest
|
Next Newest
»
Messages In This Thread
Formatting number.
- by
HY
- 26.02.2015, 17:04
Re: Formatting number.
- by
Schneider
- 26.02.2015, 17:07
Re: Formatting number.
- by
Banana_Ghost
- 26.02.2015, 17:07
Re: Formatting number.
- by
HY
- 26.02.2015, 17:08
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:
SA-MP Forums Archive
SA-MP Scripting and Plugins
Scripting Help