Raised This Month: $32 Target: $400
 8% 

Remove "LVL" tag


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
nG_getwreck
Senior Member
Join Date: Oct 2020
Location: Philippines from South K
Old 03-23-2021 , 23:47   Remove "LVL" tag
Reply With Quote #1

Hello, I have problem, my problem is removing "LVL" tag if the player/user reached the level specified.

For example:

AK47 - LVL 5

If user reached LVL 5 then it will be like this:

AK47
__________________

Last edited by nG_getwreck; 03-25-2021 at 05:01.
nG_getwreck is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-24-2021 , 09:42   Re: Remove "LVL" tag
Reply With Quote #2

How does that code even work when you're changing the name before formatting it? Switch the "formatex" and "zp_items_menu_text_add" functions.

To answer your question - simply move the item's name change inside the level check.

Code:
if(crxranks_get_user_level(id) < iLevel) {      new szName[32]     formatex(szName, charsmax(szName), "\r[LVL: %i]", iLevel)     zp_items_menu_text_add(szName)     return ZP_ITEM_NOT_AVAILABLE }
__________________

Last edited by OciXCrom; 03-24-2021 at 09:44.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
nG_getwreck
Senior Member
Join Date: Oct 2020
Location: Philippines from South K
Old 03-25-2021 , 04:44   Re: Remove "LVL" tag
Reply With Quote #3

Thanks it works now.
__________________
nG_getwreck 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 21:36.


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