-
Scripting Help
(
https://forums.alliedmods.net/forumdisplay.php?f=11)
- -
Menu problem
(
https://forums.alliedmods.net/showthread.php?t=92599)
| tlch0324 |
05-17-2009 06:40 |
Menu problem
PHP Code:
register_menucmd(register_menuid("WEAPONS_MENU"), 1023, "weapons_menu"); if(is_user_connected(id)) return PLUGIN_HANDLED; new menu[192]; new keys = (1<<0)|(1<<1)|(1<<2)|(1<<3); format(menu, 191, "\y( Weapons ):^n^n^n\y1. \rAK47^n\y2. \rM4A1^n\y3. \rAWP^n^n\y4. \rI Random!"); show_menu(id, keys, menu, -1, "WEAPONS_MENU"); return PLUGIN_HANDLED; public weapons_menu(id, keys) { switch(keys) { case 0: { fm_strip_user_weapons(id); fm_give_item(id, "weapon_ak47"); color_print(id, "^x01GET^x04AK47."); } case 1: { fm_strip_user_weapons(id); fm_give_item(id, "weapon_m4a1"); color_print(id, "^x01GET^x04M4A1."); } case 2: { fm_strip_user_weapons(id); fm_give_item(id, "weapon_awp"); color_print(id, "^x01GET ^x04AWP."); } case 3: { What should write here For random weapon? } } return 0; }
|
Re: Menu problem
PHP Code:
weapons_menu( id, random_num( 0, 2 ) );
|
| tlch0324 |
05-17-2009 11:40 |
Re: Menu problem
thank you
|
| All times are GMT -4. The time now is 01:26. |
|
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.