Raised This Month: $ Target: $400
 0% 

menu problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
~Ice*shOt
Veteran Member
Join Date: Mar 2009
Location: Lithuania
Old 05-26-2009 , 14:46   menu problem
Reply With Quote #1

what i doing bad with this menu ?
PHP Code:
public Primary(id)
{
new 
menu menu_create("\yPrimary Weapons:""prim_handle")

if (
PlayerLevel[id] >= 0)
{
menu_additem(menu"\wGlock 18C""1"0)
}
if (
PlayerLevel[id] >= 1)
{
menu_additem(menu"\wUSP .45 ACP Tactical""2"0)
}
if (
PlayerLevel[id] >= 2)
{
menu_additem(menu"\wP228 Compact""3"0)
}
if (
PlayerLevel[id] >= 3)
{
menu_additem(menu"\wFiveseveN""4"0)
}
if (
PlayerLevel[id] >= 4)
{
menu_additem(menu"\wDesert Eagle .50 AE""5"0)
}
if (
PlayerLevel[id] >= 5)
{
menu_additem(menu"\wDual Elite Berettas""6"0)
}
if (
PlayerLevel[id] >= 6)
{
menu_additem(menu"\wSchmidt TMP""7"0)
}
if (
PlayerLevel[id] >= 7)
{
menu_additem(menu"\wIngram MAC-10""8"0)
}
if (
PlayerLevel[id] >= 8)
{
menu_additem(menu"\wUMP 45""9"0)
}
if (
PlayerLevel[id] >= 9)
{
menu_additem(menu"\wMP5 Navy""10"0)
}
if (
PlayerLevel[id] >= 10)
{
menu_additem(menu"\wES P90""11"0)
}
if (
PlayerLevel[id] >= 11)
{
menu_additem(menu"/wAWP Minigun Sniper""12"0)
}
if (
PlayerLevel[id] >= 12)
{
menu_additem(menu"\wFamas""13"0)
}
if (
PlayerLevel[id] >= 13)
{
menu_additem(menu"\wIMI Galil""14"0)
}
if (
PlayerLevel[id] >= 14)
{
menu_additem(menu"\wM3 Super 90""15"0)
}
if (
PlayerLevel[id] >= 15)
{
menu_additem(menu"\wXM1014 M4""16"0)
}
if (
PlayerLevel[id] >= 16)
{
menu_additem(menu"\wAK-47 Kalashnikov""17"0)
}
if (
PlayerLevel[id] >= 17)
{
menu_additem(menu"\wM4A1 Carbine""18"0)
}
if (
PlayerLevel[id] >= 18)
{
menu_additem(menu"\wSteyr AUG A1""19"0)
}
if (
PlayerLevel[id] >= 19)
{
menu_additem(menu"\wSG-552 Commando""20"0)
}
if (
PlayerLevel[id] >= 20)
{
menu_additem(menu"\wSG-550 Auto-Sniper""21"0)
}
if (
PlayerLevel[id] >= 21)
{
menu_additem(menu"\wG3SG1 Auto-Sniper""22"0)
}
if (
PlayerLevel[id] >= 22)
{
menu_additem(menu"\wM249 Para Machinegun""23"0)
}
menu_setprop(menuMPROP_EXITMEXIT_ALL)
menu_display(idmenu0)
}
public 
prim_handle(idmenuitem)
{
if (
item == MENU_EXIT)
{
menu_destroy(menu)
return 
PLUGIN_HANDLED
}
new 
data[6], iName[64]
new 
accesscallback
menu_item_getinfo
(menuitemaccessdata,5iName63callback)
new 
key str_to_num(data)
switch(
key)
{
case 
0:{
drop_secondary(id)
fm_give_item(id"weapon_glock18")
fm_set_user_bpammo(idCSW_GLOCK18100)
}
case 
1:{
drop_secondary(id)
fm_give_item(id"weapon_usp")
fm_set_user_bpammo(idCSW_USP100)
}
case 
2:{
drop_secondary(id)
fm_give_item(id"weapon_p228")
fm_set_user_bpammo(idCSW_P22852)
}
case 
3:{
drop_secondary(id)
fm_give_item(id"weapon_fiveseven")
fm_set_user_bpammo(idCSW_FIVESEVEN100)
}
case 
4:{
drop_secondary(id)
fm_give_item(id"weapon_deagle")
fm_set_user_bpammo(idCSW_DEAGLE35)
}
case 
5:{
drop_secondary(id)
fm_give_item(id"weapon_elite")
fm_set_user_bpammo(idCSW_ELITE120)
}
case 
6:{
drop_primary(id)
fm_give_item(id"weapon_tmp")
fm_set_user_bpammo(idCSW_TMP120)
}
case 
7:{
drop_primary(id)
fm_give_item(id"weapon_mac10")
fm_set_user_bpammo(idCSW_MAC10120)
}
case 
8:{
drop_primary(id)
fm_give_item(id"weapon_ump45")
fm_set_user_bpammo(idCSW_UMP45100)
}
case 
9:{
drop_primary(id)
fm_give_item(id"weapon_mp5navy")
fm_set_user_bpammo(idCSW_MP5NAVY120)
}
case 
10:{
drop_primary(id)
fm_give_item(id"weapon_p90")
fm_set_user_bpammo(idCSW_P90100)
}
case 
11:{
drop_primary(id)
fm_give_item(id"weapon_awp")
fm_set_user_bpammo(idCSW_AWP30)
}
case 
12:{
drop_primary(id)
fm_give_item(id"weapon_famas")
fm_set_user_bpammo(idCSW_FAMAS90)
}
case 
13:{
drop_primary(id)
fm_give_item(id"weapon_galil")
fm_set_user_bpammo(idCSW_GALIL90)
}
case 
14:{
drop_primary(id)
fm_give_item(id"weapon_m3")
fm_set_user_bpammo(idCSW_M332)
}
case 
15:{
drop_primary(id)
fm_give_item(id"weapon_xm1014")
fm_set_user_bpammo(idCSW_XM101432)
}
case 
16:{
drop_primary(id)
fm_give_item(id"weapon_ak47")
fm_set_user_bpammo(idCSW_AK4790)
}
case 
17:{
drop_primary(id)
fm_give_item(id"weapon_m4a1")
fm_set_user_bpammo(idCSW_M4A190)
}
case 
18:{
drop_primary(id)
fm_give_item(id"weapon_aug")
fm_set_user_bpammo(idCSW_AUG90)
}
case 
19:{
drop_primary(id)
fm_give_item(id"weapon_sg552")
fm_set_user_bpammo(idCSW_SG55290)
}
case 
20:{
drop_primary(id)
fm_give_item(id"weapon_sg550")
fm_set_user_bpammo(idCSW_SG55090)
}
case 
21:{
drop_primary(id)
fm_give_item(id"weapon_g3sg1")
fm_set_user_bpammo(idCSW_G3SG190)
}
case 
22:{
drop_primary(id)
fm_give_item(id"weapon_m249")
fm_set_user_bpammo(idCSW_M249200)
}
}

~Ice*shOt is offline
Send a message via Skype™ to ~Ice*shOt
zacky
Senior Member
Join Date: Mar 2008
Location: Sweden
Old 05-26-2009 , 14:49   Re: menu problem
Reply With Quote #2

Post the errors?
And first, make indentation better.
zacky is offline
Send a message via Skype™ to zacky
~Ice*shOt
Veteran Member
Join Date: Mar 2009
Location: Lithuania
Old 05-26-2009 , 15:19   Re: menu problem
Reply With Quote #3

Quote:
Originally Posted by zacky View Post
Post the errors?
And first, make indentation better.
no errors but I do not show this menu
~Ice*shOt is offline
Send a message via Skype™ to ~Ice*shOt
TitANious
Veteran Member
Join Date: Feb 2009
Location: Denmark
Old 05-26-2009 , 15:32   Re: menu problem
Reply With Quote #4

Quote:
Originally Posted by ~Ice*shOt View Post
no errors but I do not show this menu
http://forums.alliedmods.net/showthread.php?t=46364
__________________
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 05-26-2009 , 19:04   Re: menu problem
Reply With Quote #5

Quote:
Originally Posted by arkshine View Post
Oh no, Fysik will get mad!


Quote:
Originally Posted by arkshine View Post
It was a joke about the indentation, not you. Forget. Fysik will understand.
Yep .

Quote:
Originally Posted by zacky View Post
Oh, now i remember
Hello.
__________________
fysiks is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-26-2009 , 20:21   Re: menu problem
Reply With Quote #6

The variable "key" starts at 1 btw. Try and debug it.

As far as I can tell it should show. Unless your level is less than zero.
__________________

Last edited by fysiks; 05-26-2009 at 20:25.
fysiks is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-26-2009 , 14:52   Re: menu problem
Reply With Quote #7

Oh no, Fysik will get mad!
Arkshine is offline
zacky
Senior Member
Join Date: Mar 2008
Location: Sweden
Old 05-26-2009 , 14:58   Re: menu problem
Reply With Quote #8

Quote:
Originally Posted by arkshine View Post
Oh no, Fysik will get mad!
wtf?!
zacky is offline
Send a message via Skype™ to zacky
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-26-2009 , 15:04   Re: menu problem
Reply With Quote #9

It was a joke about the indentation, not you. Forget. Fysik will understand.
Arkshine is offline
zacky
Senior Member
Join Date: Mar 2008
Location: Sweden
Old 05-26-2009 , 15:19   Re: menu problem
Reply With Quote #10

Quote:
Originally Posted by arkshine View Post
It was a joke about the indentation, not you. Forget. Fysik will understand.
And btw, who is Fysik?
zacky is offline
Send a message via Skype™ to zacky
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 01:28.


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