Raised This Month: $ Target: $400
 0% 

start from 001


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 05-23-2009 , 23:29   Re: start from 001
Reply With Quote #1

Quote:
Originally Posted by shine771 View Post
PHP Code:
new Cherry

public GimmeCherry() {
    
    new 
sCherry[4]
    
    
Cherry++
    
    
formatex(sCherry,3,"%s%s%d",Cherry 100 "0" ""Cherry 10 "0" "",Cherry)
    
    
client_print(0,print_chat,"%s",sCherry)

WOW! Just do this:
PHP Code:
new Cherry

public GimmeCherry() {
    
    
Cherry++
    
    
client_print(0,print_chat,"%03i",Cherry)

%3i means an integer with 3 character spaces used. If the number is 2 or less digits, it will fill the rest with spaces.
%03i means that the spaces to fill the emptiness will be 0's instead.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:25.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode