AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   register_new_item () It's a stock, how? (https://forums.alliedmods.net/showthread.php?t=95033)

TitANious 06-18-2009 17:11

register_new_item () It's a stock, how?
 
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 :)

fysiks 06-18-2009 18:10

Re: register_new_item () It's a stock, how?
 
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.

SnoW 06-19-2009 03:04

Re: register_new_item () It's a stock, how?
 
Ooo, I can register a new item with menu_additem.

TitANious 06-19-2009 12:46

Re: register_new_item () It's a stock, how?
 
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

SnoW 06-19-2009 16:18

Re: register_new_item () It's a stock, how?
 
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.

TitANious 06-19-2009 16:28

Re: register_new_item () It's a stock, how?
 
What's the difference between dynamic and * ? :)

xPaw 06-19-2009 16:51

Re: register_new_item () It's a stock, how?
 
Wh... Whhh... What ?!

TitANious 06-19-2009 17:00

Re: register_new_item () It's a stock, how?
 
Idk what a dynamic thing are, in this case a native :(

fysiks 06-19-2009 17:40

Re: register_new_item () It's a stock, how?
 
Over your head.

SnoW 06-20-2009 05:09

Re: register_new_item () It's a stock, how?
 
http://forums.alliedmods.net/showthread.php?t=41251


All times are GMT -4. The time now is 15:37.

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