Quote:
Originally Posted by Nyuszy
PHP Code:
new exp = zp44_xp[id] / max_xp * 100
client_print(id, print_center, "Experience: %i%", exp)
|
1. You should multiply 100 first, otherwise it will be a truncated decimal always resulting in 0.
2. To show a percent sign in a format, you need to use a double percent sign.
PHP Code:
new exp = zp44_xp[id] * 100 / max_xp
client_print(id, print_center, "Experience: %i%%", exp)
__________________