Help Anti Furien Weapon Menu
How to add new weapons in the weapon menu for furien.
/* Plugin generated by AMXX-Studio */ #include < amxmodx > #include < amxmisc > #include < hamsandwich > #include < ColorChat > native give_weapon_oicw ( id ); native give_weapon_plasma ( id ); native give_weapon_balrog3 ( id ); native give_ethereal_wpn ( id ); native give_weapon_cannon ( id ); #define PLUGIN "CSO Weapons" #define VERSION "1.0" #define AUTHOR "Ionutz." new bool: AlreadyChoose[ 33 ]; public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) RegisterHam( Ham_Spawn, "player", "fwPlayerSpawn", 1 ); register_clcmd( "say /weapons", "ClcmdWeaponsMenus" ); } public fwPlayerSpawn( id ) { if( get_user_team ( id ) == 2 ) { AlreadyChoose[ id ] = false; ShowWeaponsMenu ( id ); } return 0; } public ShowWeaponsMenu ( id ) { new menu = menu_create ( "\yAnti-Furien\r Weapons Menu", "FurienWeaponsHandler" ); menu_additem ( menu , "\yOICW", "1" , 0 ); menu_additem ( menu , "\yBalrog \rIII", "2", 0 ); menu_additem ( menu , "\yPlasma \rGun", "3", 0 ); menu_additem ( menu , "\yDragon \rCannon", "4", 0 ); menu_additem ( menu , "\yEthereal", "5", 0 ); menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL ); menu_display ( id, menu, 0 ); return 1; } public FurienWeaponsHandler( id, menu, item ) { if ( get_user_team ( id ) != 2 ) return 1; if( item == MENU_EXIT ) { menu_destroy ( menu ) return PLUGIN_HANDLED } switch( item ) { case 0: { give_weapon_oicw (id); AlreadyChoose[ id ] = true; } case 1: { give_weapon_balrog3 (id); AlreadyChoose[ id ] = true; } case 2: { give_weapon_plasma (id); AlreadyChoose[ id ] = true; } case 3: { give_weapon_cannon (id); AlreadyChoose[ id ] = true; } case 4: { give_ethereal_wpn (id); AlreadyChoose[ id ] = true ; } } menu_destroy( menu ) return 1; } public ClcmdWeaponsMenus( id ) { if( !is_user_alive( id ) ) { ColorChat( id, GREEN, "^x01[^x04 Furien Weapons^x01 ] Nu poti alege arme cand esti mort!" ); return 1; } if( AlreadyChoose[ id ] ) { ColorChat( id, GREEN, "^x01[^x04 Furien Weapons^x01 ] Ti-ai ales armele runda acesta" ); return 1; } if( get_user_team( id ) == 2 ) { ShowWeaponsMenu( id ); } return 1; } /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par } */ |
Re: Help Anti Furien Weapon Menu
You can use this plugin:
Quote:
|
Re: Help Anti Furien Weapon Menu
Quote:
|
Re: Help Anti Furien Weapon Menu
Quote:
|
Re: Help Anti Furien Weapon Menu
I'm 99% sure that this is impossible, without some changes. This is how it works:
If you write PlasmaGun, it will become weapon_plasmagun that doesn't exists. Yes, cso weapons just change the proprieties of already existing weapons, so you could edit cso source to apply the effects when a player get the needed weapons, BUT it the menu it cannot be the cso weap name. It is possible to add a new field in the file: NameForMenu or sth like this. So, you will have PlasmanGun as name for menu, and the weapon that it's replace as a weapon for formating and for doing boring stuffs. Then, you can use xvar/bool/forward/even a native to know when a player get the weapon from the menu and apply effects. On Topic: use php or small tags around the code. |
Re: Help Anti Furien Weapon Menu
@ HamletEagle, thank you for the explanation. I appreciate it as I can learn a lot from it. ;)
|
| All times are GMT -4. The time now is 13:21. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.