Quote:
Originally Posted by shine771
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.
__________________