Menu_additem, and menu handler error.
Hey,
I want to use menu_additem for specific level to show him his item. So starting with this => PHP Code:
PHP Code:
PHP Code:
only case 0 is excuting |
Re: Menu_additem, and menu handler error.
PHP Code:
PHP Code:
PHP Code:
|
Re: Menu_additem, and menu handler error.
This is not what I needed, I mean I could make this, but I dont want the items to be shown for everyone, just the levels I have specified
In the menu register => switch(crxranks_get_user_level(id)) .. I hope you get me The problem is in the menu handler, case 0 is executing for all items, which means if someone who have level 3, he choses the M3 (case 3 in the menu register), he gets TMP which is case 0 in the handler |
Re: Menu_additem, and menu handler error.
Quote:
|
Re: Menu_additem, and menu handler error.
But what is the reason that my code is executing only 'case 0' ? With your code, I can use only 1-2-3-4-5-... in order and I cant use like case 5..7, level 5 to 7.
|
Re: Menu_additem, and menu handler error.
Quote:
My loop executes max 4 times (sizeof(g_szWeaponsPrimaryList) == 4). Add more weapons or loop till max level. |
Re: Menu_additem, and menu handler error.
What if I want to use native from another plugin to give guns? Like give_tornado_gun.
|
Re: Menu_additem, and menu handler error.
Quote:
|
Re: Menu_additem, and menu handler error.
I think you didnt get what I mean, im using normal guns (from cs 1.6) and natives from other guns,
Well I need to do if(item == x) or use switch in the handler.. I cant use both give_item and native PS: Is there anyway I can make me code to work? |
Re: Menu_additem, and menu handler error.
Quote:
for example :- player reach level 20 than he will get golden ak47 (for example) from another plugin or golden ak 47 plugin ? am i correct ? |
All times are GMT -4. The time now is 21:08. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.