Raised This Month: $ Target: $400
 0% 

(help) What's wrong with my menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-27-2010 , 05:59   Re: (help) What's wrong with my menu
Reply With Quote #1

you forgot MENU_KEY_3 on both keys list.
Also, you have to return PLUGIN_HANDLED in menu handler.

In menu handler, use a switch statement

Code:
switch( key )
{
    case 0:give_item(id, "weapon_ak47")
    case 1:give_item(id, "weapon_XXX")
    case 2:give_item(id, "weapon_XXX")
}

Also, i think you are a bit confused :

MENU_KEY_1 represent slot1

but in handler, key : 0 represent slot 1



MENU_KEY_0 represent slot 0 (exit)
key : 9 is slot 0 (exit)
__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 11:17.


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