Making a menu [noob one]
Hi,
I have a rather noob question. For my defense I'm not very used to pawn. 2 questions for you... 1- How do I put a colors in show_menu()? Are there esc sequences for red, green, blue, etc etc... 2- What are those \y and \R sequences I see? Also whats ^n? Replaces the C89's newlines \n? That's rather idiot question, and it's true I could find it myself but... I'm trying to save time here. Thanks! Misery |
Re: Making a menu [noob one]
The colors in Menu are /y yellow, /r red and /w white,
^n yes, is new line. |
Re: Making a menu [noob one]
^ is the standard escape character in Pawn (or at least for our compiler).
Quote:
\R (not the case) is for right alignment (which is approximately in the middle of your screen. |
Re: Making a menu [noob one]
Emp` has a good tutorial about menus: http://forums.alliedmods.net/showthread.php?t=46364
It explains almost everything :P |
Re: Making a menu [noob one]
Thanks alot guys, those thing were not obvious to me!
Also, could some1 explain me this line Code:
register_menucmd( register_menuid("\yOptions:"), 1023, "menu_cmd" )2-Also, is "menu_cmd" the function which shows the menu? Thanks! Misery |
Re: Making a menu [noob one]
Quote:
2. menu_cmd is the function that is called when an option is chosen for the menu corresponding to the register_menuid(...). Look at how other plugins use that menu system. But, remember that that code you posted is an entirely different menu system than the one posted above (the thread by Emp'). Unless you have a specific reason for the menu style you posted above I would recommend the one in the link. |
Re: Making a menu [noob one]
So basically...
register_menuid() is useless? Let's sayd I had two menus with the same string... it will generate the same menuid for the twos? Not very secure? |
Re: Making a menu [noob one]
Quote:
|
Re: Making a menu [noob one]
Quote:
Because frankly, register_menuid() is a piece of shit. |
Re: Making a menu [noob one]
Quote:
|
| All times are GMT -4. The time now is 11:56. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.