Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Plugin generated by AMXX-Studio */
- #include <amxmodx>
- #include <amxmisc>
- #define PLUGIN "New Plug-In"
- #define VERSION "1.0"
- #define AUTHOR "Måns"
- const MaxClients = 32;
- enum _:TNades
- {
- _He_Grenade,
- _Flashbang,
- _Smoke_Grenade,
- };
- enum _:CTNades
- {
- _He_Grenade_Immunity,
- _Flashbang_Immunity,
- _Smoke_Grenade_Immunity,
- };
- enum _:TModifiers
- {
- _Health,
- _Armor,
- _Reincarnation,
- _Fall_Damage_Reducer,
- };
- enum _:CTModifiers
- {
- _Health,
- _Armor,
- _Reincarnation,
- _Fall_Damage_Reducer,
- };
- enum _:ItemData
- {
- _Name[ MaxClients ],
- _Description[ 128 ],
- _Category[ MaxClients ],
- _Value_Type[ 10 ],
- _First_Cost,
- _Max_Level,
- _Max_Value
- };
- new const TNadeInfo[ TNades ][ ItemData ] =
- {
- // _He_Grenade
- {
- "HE Grenade",
- "Grants one additional HE",
- "TGrenades",
- "%",
- 10,
- 5,
- 50
- },
- // _Flashbang
- {
- "Flashbang",
- "Grants one additional Flash",
- "TGrenades",
- "%",
- 5,
- 10,
- 100
- },
- // _Smoke_Grenade
- {
- "Smoke Grenade",
- "Grants one additional Smoke",
- "TGrenades",
- "%",
- 5,
- 10,
- 100
- }
- };
- new const CTNadeInfo[ CTNades ][ ItemData ] =
- {
- // _He_Grenade_Immunity
- {
- "HE Grenade Immunity",
- "Grants one additional HE Immunity",
- "CTGrenades",
- "%",
- 20,
- 5,
- 50
- },
- // _Flashbang_Immunity
- {
- "Flashbang Immunity",
- "Grants one additional Flash Immunity",
- "CTGrenades",
- "%",
- 10,
- 10,
- 100
- },
- // _Smoke_Grenade_Immunity
- {
- "Smoke Grenade",
- "Grants one additional Smoke Immunity",
- "CTGrenades",
- "%",
- 10,
- 10,
- 100
- }
- };
- new const TNadeClassname[ TNades ][ ] =
- {
- "weapon_hegrenade",
- "weapon_flashbang",
- "weapon_smokegrenade"
- };
- new const CTNadeClassname[ CTNades ][ ] =
- {
- "",
- "",
- ""
- };
- new const TPlayerModifiersInfo[ TModifiers ][ ItemData ] =
- {
- // _Health
- {
- "Health",
- "Increases your base HP",
- "T Player Modifiers",
- " HP",
- 20,
- 5,
- 50
- },
- // _Armor
- {
- "Armor",
- "Increases your base AP",
- "T Player Modifiers",
- " AP",
- 10,
- 10,
- 200
- },
- // _Reincarnation
- {
- "Reincarnation",
- "Allows you to respawn upon death",
- "T Player Modifiers",
- "%",
- 25,
- 5,
- 25
- },
- // _Fall_Damage_Reducer
- {
- "Fall Damage Reducer",
- "Will reduce damage taken from falling",
- "T Player Modifiers",
- "%",
- 10,
- 4,
- 20
- }
- };
- new const CTPlayerModifiersInfo[ CTModifiers ][ ItemData ] =
- {
- // _Health
- {
- "Health",
- "Increases your base HP",
- "CT Player Modifiers",
- " HP",
- 20,
- 5,
- 50
- },
- // _Armor
- {
- "Armor",
- "Increases your base AP",
- "CT Player Modifiers",
- " AP",
- 10,
- 10,
- 200
- },
- // _Reincarnation
- {
- "Reincarnation",
- "Allows you to respawn upon death",
- "T Player Modifiers",
- "%",
- 30,
- 5,
- 50
- },
- // _Fall_Damage_Reducer
- {
- "Fall Damage Reducer",
- "Will reduce damage taken from falling",
- "CT Player Modifiers",
- "%",
- 10,
- 4,
- 20
- }
- };
- enum Category
- {
- _T_Grenades,
- _CT_Grenades,
- _T_Player_Modifiers,
- _CT_Player_Modifiers,
- _None
- };
- new gRed[ MaxClients + 1 ],
- gBlue[ MaxClients + 1 ]
- new TNadeLevel[ MaxClients + 1 ][ TNades ],
- CTNadeLevel[ MaxClients + 1][ CTNades ],
- TPlayerModifierLevel[ MaxClients + 1 ][ TModifiers ],
- CTPlayerModifierLevel[ MaxClients + 1 ][ CTModifiers ];
- new MenuItem[ MaxClients + 1 ],
- Category:MenuCategory[ MaxClients + 1 ];
- new bool:PlayerRevived[ MaxClients + 1 ];
- new MaxPlayers;
- public plugin_init() {
- register_plugin(PLUGIN, VERSION, AUTHOR)
- register_clcmd( "say /points", "Points_ShowMainMenu" )
- }
- public Points_ShowMainMenu( const id )
- {
- if( is_user_connected( id ) )
- {
- ShowMainMenu( id )
- }
- }
- ShowMainMenu( id )
- {
- new Title[ 256 ];
- formatex( Title, charsmax( Title ),
- "\r[ \yRedBlue \r]^n\wMain Menu^n^nRed: \y%i^n\wBlue: \y%i^n\wPremium: \y%s\w^n^n",
- gRed[ id ],
- gBlue[ id ]
- )
- new Menu = menu_create( Title, "MainMenuHandler" ),
- Callback = menu_makecallback( "CallbackMainMenu" );
- menu_additem( Menu, "Terrorist Shop", "1" )
- menu_additem( Menu, "Counter-Terrorist Shop", "2" )
- menu_display( id, Menu );
- }
- public MainMenuHandler( id, Menu, Item )
- {
- if( Item == MENU_EXIT )
- {
- menu_destroy( Menu );
- return;
- }
- new Info[ 2 ], Access, Callback;
- menu_item_getinfo( Menu, Item, Access, Info, charsmax( Info ), _, _, Callback );
- menu_destroy( Menu );
- switch( Info[ 0 ] )
- {
- case '1':
- {
- ShowTItemCategoryMenu( id );
- }
- case '2':
- {
- //ShowCTItemCategoryMenu( id )
- }
- }
- }
- ShowTItemCategoryMenu( const id )
- {
- new Title[ 256 ];
- formatex( Title, charsmax( Title ),
- "\r[ \yRedBlue \r]^n\wTerrorist Item Category Menu^n^n"
- );
- new Menu = menu_create( Title, "ItemTCategoryMenuHandler" );
- menu_additem( Menu, "Grenades", "1" );
- menu_additem( Menu, "Player Modifiers^n", "2" );
- //menu_additem( Menu, "Item Info", "3" );
- menu_setprop( Menu, MPROP_EXITNAME, "Main Menu" );
- menu_display( id, Menu );
- }
- public ItemTCategoryMenuHandler( id, Menu, Item )
- {
- if( Item == MENU_EXIT )
- {
- menu_destroy( Menu );
- ShowMainMenu( id );
- return;
- }
- new Info[ 2 ], Access, Callback;
- menu_item_getinfo( Menu, Item, Access, Info, charsmax( Info ), _, _, Callback );
- menu_destroy( Menu );
- switch( Info[ 0 ] )
- {
- case '1':
- {
- //ShowTGrenadeMenu( id );
- }
- case '2':
- {
- //ShowTPlayerModifiersMenu( id );
- }
- case '3':
- {
- //ShowInfoMOTD( Client );
- }
- }
- }
Add Comment
Please, Sign In to add comment