How can i make ocixcrom level plugin to show 5,000/10,000Xp in hud?
Hi! I want to make the xp hud to look like 5,000/10,000xp instead of 5000/10000xp. I'm using ocixcrom level system plugin
I want to make this:https://i.imgur.com/pEyajk0_d.webp?m...fidelity=grand To look like this one:https://i.imgur.com/XeBntCb.jpg Thank you!! |
Re: How can i make ocixcrom level plugin to show 5,000/10,000Xp in hud?
This would require messing with the main code (crx_ranksystem.sma).
Add this function somewhere in the code (e.g. in the bottom): PHP Code:
You'll see this piece of code: Code:
This is how the XP is displayed - it converts the number into a string. Simply change "num_to_str" to "AddCommas" and it should add commas to the number. Do the same to the other portions of the code below this one - for ARG_NEXT_XP and ARG_XP_NEEDED. |
Re: How can i make ocixcrom level plugin to show 5,000/10,000Xp in hud?
Quote:
|
Re: How can i make ocixcrom level plugin to show 5,000/10,000Xp in hud?
Impossible. Post the full code with your changes.
|
Re: How can i make ocixcrom level plugin to show 5,000/10,000Xp in hud?
Quote:
I forgot i edited your plugin a little bit. The AddCommas function works only for the original HUD message of your plugin, but doesn't work for the edited HUD message. My ZM server doesn't use the original HUD message. Instead, i disabled it: Code:
HUDINFO_ENABLED = 1Code:
HUDINFO_ENABLED = 0See this screenshot: https://pasteboard.co/X1vmEk3HoSoa.jpg As you can see in the image above, the AddCommas function works only for the original HUD, but not for the edited HUD - the HUD added in the ZP HUD info message. I would like the original HUD to be disabled, so only the edited HUD to remain. In other words, i want the comma to be added to the HUD rank message that is part of the ZP HUD info message. Do you understand what I'm talking about? My English is bad, but i will try explaining better, if you don't understand me. |
Re: How can i make ocixcrom level plugin to show 5,000/10,000Xp in hud?
This function should work in any plugin with any code but make sure you are Use it correctly.
PHP Code:
|
Re: How can i make ocixcrom level plugin to show 5,000/10,000Xp in hud?
Quote:
|
Re: How can i make ocixcrom level plugin to show 5,000/10,000Xp in hud?
Quote:
|
Re: How can i make ocixcrom level plugin to show 5,000/10,000Xp in hud?
If you're using a different plugin for the HUD, of course you need to add the AddCommas function there.
|
| All times are GMT -4. The time now is 11:42. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.