Raised This Month: $ Target: $400
 0% 

register_new_item () It's a stock, how?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TitANious
Veteran Member
Join Date: Feb 2009
Location: Denmark
Old 06-18-2009 , 17:11   register_new_item () It's a stock, how?
Reply With Quote #1

Hmm, i saw in some plugins how to add something new in a menu. I mean register a new item with a new script. I would like to know how
__________________
I dislike this.

"A sneeze never comes alone!" <-- Important to remember.
TitANious is offline
Send a message via MSN to TitANious
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-18-2009 , 18:10   Re: register_new_item () It's a stock, how?
Reply With Quote #2

If you've seen it in other plugins, look at those plugins OR search for it. Honestly, it seems like you are just writing giberish.
__________________
fysiks is offline
Old 06-18-2009, 18:15
alan_el_more
This message has been deleted by alan_el_more.
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 06-19-2009 , 03:04   Re: register_new_item () It's a stock, how?
Reply With Quote #3

Ooo, I can register a new item with menu_additem.
SnoW is offline
Send a message via MSN to SnoW
TitANious
Veteran Member
Join Date: Feb 2009
Location: Denmark
Old 06-19-2009 , 12:46   Re: register_new_item () It's a stock, how?
Reply With Quote #4

Lol i mean like the XP Weapon Mod by xBasista and ZP of Mercylez
(I know i spelled wrong, but i don't know how it's spelled.) It's to be in an include
__________________
I dislike this.

"A sneeze never comes alone!" <-- Important to remember.
TitANious is offline
Send a message via MSN to TitANious
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 06-19-2009 , 16:18   Re: register_new_item () It's a stock, how?
Reply With Quote #5

PHP Code:
add_new_itemid )
{
     new 
oldmenumenu;
     
player_menu_infoidoldmenumenu );
     if( 
menu //New menu
     
{
           
client_cmdid"slot10" );
           
menu_additemmenu"New item" );
           
menu_displayidmenu );
     }
     
//else { } //Old menu action if wanted

This can only add an item to a menu player is currently viewing. Also we can't know what the menu handler does to it's items and this is a bad idea anyway. If you are wanting to do this properly you should use dynamic natives.
SnoW is offline
Send a message via MSN to SnoW
TitANious
Veteran Member
Join Date: Feb 2009
Location: Denmark
Old 06-19-2009 , 16:28   Re: register_new_item () It's a stock, how?
Reply With Quote #6

What's the difference between dynamic and * ?
__________________
I dislike this.

"A sneeze never comes alone!" <-- Important to remember.
TitANious is offline
Send a message via MSN to TitANious
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 06-19-2009 , 16:51   Re: register_new_item () It's a stock, how?
Reply With Quote #7

Wh... Whhh... What ?!
__________________
xPaw is offline
TitANious
Veteran Member
Join Date: Feb 2009
Location: Denmark
Old 06-19-2009 , 17:00   Re: register_new_item () It's a stock, how?
Reply With Quote #8

Idk what a dynamic thing are, in this case a native
__________________
I dislike this.

"A sneeze never comes alone!" <-- Important to remember.
TitANious is offline
Send a message via MSN to TitANious
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-19-2009 , 17:40   Re: register_new_item () It's a stock, how?
Reply With Quote #9

Over your head.
__________________
fysiks is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 06-20-2009 , 05:09   Re: register_new_item () It's a stock, how?
Reply With Quote #10

http://forums.alliedmods.net/showthread.php?t=41251
SnoW is offline
Send a message via MSN to SnoW
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 15:37.


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