Raised This Month: $51 Target: $400
 12% 

Change numeric color for menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HowToRuski
Senior Member
Join Date: Feb 2019
Location: Hungary
Old 03-31-2023 , 13:07   Change numeric color for menu
Reply With Quote #1

Hello, is there a way i can change the menu numeric color?
For example -
https://imgur.com/KOau4Rg

Heres the code im using
PHP Code:
formatex(menucharsmax(menu), "%s \w[\y%d %L\w]"buffercostid"COINS")
        
buffer[0] = item
        buffer
[1] = 0
        menu_additem
(menuidmenubuffer
HowToRuski is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 03-31-2023 , 13:44   Re: Change numeric color for menu
Reply With Quote #2

Red is the default color afaik.

If that's not the answer you're looking for, these links might help:

https://forums.alliedmods.net/showthread.php?t=287197
https://forums.alliedmods.net/showth...75878?t=175878
__________________

Last edited by Napoleon_be; 03-31-2023 at 13:50.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
HowToRuski
Senior Member
Join Date: Feb 2019
Location: Hungary
Old 03-31-2023 , 13:46   Re: Change numeric color for menu
Reply With Quote #3

Quote:
Originally Posted by Napoleon_be View Post
Red is the default color afaik.
So i guess its not changeable?
HowToRuski is offline
lexzor
Veteran Member
Join Date: Nov 2020
Old 03-31-2023 , 14:12   Re: Change numeric color for menu
Reply With Quote #4

https://www.amxmodx.org/api/newmenus

https://imgur.com/kJqtVU4

https://forums.alliedmods.net/showthread.php?t=46364 (may be outdated but: https://imgur.com/qbqlLIA)

don't know if you can make the text to have that color

as far as i know you can use these colors with old register menu system
lexzor is offline
HowToRuski
Senior Member
Join Date: Feb 2019
Location: Hungary
Old 03-31-2023 , 14:25   Re: Change numeric color for menu
Reply With Quote #5

Quote:
Originally Posted by lexzor View Post
https://www.amxmodx.org/api/newmenus

https://imgur.com/kJqtVU4

https://forums.alliedmods.net/showthread.php?t=46364 (may be outdated but: https://imgur.com/qbqlLIA)

don't know if you can make the text to have that color

as far as i know you can use these colors with old register menu system
Worked great for me. Thanks!

Btw. is there a way i can make numbering like [1] [2] [3] [4] etc...?

Last edited by HowToRuski; 03-31-2023 at 14:34.
HowToRuski is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 03-31-2023 , 14:40   Re: Change numeric color for menu
Reply With Quote #6

Quote:
Originally Posted by HowToRuski View Post
Worked great for me. Thanks!

Btw. is there a way i can make numbering like [1] [2] [3] [4] etc...?
First link i shared should answer your question.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
HowToRuski
Senior Member
Join Date: Feb 2019
Location: Hungary
Old 03-31-2023 , 14:40   Re: Change numeric color for menu
Reply With Quote #7

Quote:
Originally Posted by Napoleon_be View Post
First link i shared should answer your question.
Without any other includes... Maybe amxx 1.9 bringed options like this? Since im using 1.9
HowToRuski is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 03-31-2023 , 14:42   Re: Change numeric color for menu
Reply With Quote #8

Quote:
Originally Posted by HowToRuski View Post
Without any other includes... Maybe amxx 1.9 bringed options like this? Since im using 1.9
Afaik it's only possible using old menu styles.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
mlibre
Veteran Member
Join Date: Nov 2015
Location: return PLUGIN_CONTINUE
Old 04-11-2023 , 13:06   Re: Change numeric color for menu
Reply With Quote #9

colors for menu
  • \w = white
  • \y = yellow
  • \r = red
__________________
mlibre is offline
Uzviseni Bog
Senior Member
Join Date: Jun 2020
Old 04-11-2023 , 18:42   Re: Change numeric color for menu
Reply With Quote #10

Quote:
Originally Posted by HowToRuski View Post
Worked great for me. Thanks!

Btw. is there a way i can make numbering like [1] [2] [3] [4] etc...?

Solved

PHP Code:
#include <amxmodx>

public plugin_init()
{
    
register_plugin("My Menu""1.0""Me");
    
register_clcmd("say /menu""ShowMenu")
    new 
keys MENU_KEY_0|MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_5|MENU_KEY_6|MENU_KEY_7|MENU_KEY_9
    register_menucmd
(register_menuid("\yChange menu name:"), keys"UzviseniBog")

}

public 
ShowMenu(id)
{
    new 
menu[314]
    new 
keys MENU_KEY_0|MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_5|MENU_KEY_6|MENU_KEY_7|MENU_KEY_9
    formatex
(menu charsmax(menu) , "\yChange menu name:^n^n\r[\w1\r]. \wTEXT^n\r[\w2\r]. \wTEXT^n\r[\w3\r]. \wTEXT^n\r[\w4\r]. \wTEXT^n\r[\w5\r]. \wTEXT^n\r[\w6\r]. \wTEXT^n\r[\w7\r]. \wTEXT^n^n\r[\w9\r].\w Exit")
    
show_menu(idkeysmenu)
    return 
PLUGIN_HANDLED
}

public 
UzviseniBog(idkey)
{
    
//key will start at zero
    
if (key == 0)
    {
         
client_cmd(id"Number 1 function")
    } else if (
key == 1) {
         
client_cmd(id"Number 2 function")
    } else if (
key == 2) {
         
client_cmd(id"Number 3 function")
    } else if (
key == 3){
        
client_cmd(id"Number 4 function")
    } else if (
key == 4){
        
client_cmd(id"Number 5 function")
    } else if (
key == 5){
        
client_cmd(id"Number 6 function")
    } else if (
key == 6){
        
client_cmd(id"Number 7 function")
    } else if (
key == 9){

    }

Uzviseni Bog 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 14:28.


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