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

menu_item_setname - Put a parameter to format it


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 01-28-2019 , 09:35   menu_item_setname - Put a parameter to format it
Reply With Quote #1

Hello, in new amxmodx features someone can put a extra parameter to format the given string?

Code:
menu_item_setname(menu, item, const format[], ...)
Like that. Is only a suggestion.
Thanks for all
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 01-28-2019 , 10:25   Re: menu_item_setname - Put a parameter to format it
Reply With Quote #2

MPROP_EXITNUMBER as well, because menu_addblank, menu_addblank2, menu_addtext and menu_addtext2 break entire menu and set "exit" to any other number than 0.
__________________









Last edited by CrazY.; 01-28-2019 at 10:25.
CrazY. is offline
Mistrick
Senior Member
Join Date: Aug 2012
Location: Russia
Old 01-28-2019 , 12:19   Re: menu_item_setname - Put a parameter to format it
Reply With Quote #3

Just use fmt().
Mistrick is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 01-28-2019 , 20:16   Re: menu_item_setname - Put a parameter to format it
Reply With Quote #4

Quote:
Originally Posted by Mistrick View Post
Just use fmt().
There is no problem with format, but what is the cost to add these features to these type of functions?
Is a suggestion to future functions.

This is amxmodx discussion, not plugin help thread
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-28-2019 , 21:35   Re: menu_item_setname - Put a parameter to format it
Reply With Quote #5

This would probably break backwards compatibility when there is a percent symbol (%) in the string.
__________________
fysiks is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 01-29-2019 , 07:12   Re: menu_item_setname - Put a parameter to format it
Reply With Quote #6

Quote:
Originally Posted by fysiks View Post
This would probably break backwards compatibility when there is a percent symbol (%) in the string.
uhm, i not think on this. Thanks!
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
Reply


Thread Tools
Display Modes

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 19:06.


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