Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #include <cstrike>
- #include <fakemeta>
- new bool: HasScout1WeaponsModel [ 33 ]
- new bool: HasScout2WeaponsModel [ 33 ]
- new bool: HasScout3WeaponsModel [ 33 ]
- new bool: HasScout4WeaponsModel [ 33 ]
- new bool: HasScout5WeaponsModel [ 33 ]
- new bool: HasScout6WeaponsModel [ 33 ]
- new bool: HasScout7WeaponsModel [ 33 ]
- new bool: HasScout8WeaponsModel [ 33 ]
- new bool: HasScout9WeaponsModel [ 33 ]
- new bool: HasScout10WeaponsModel [ 33 ]
- public plugin_precache(){
- precache_model("models/LoLHnrScout/v_scout1.mdl")
- precache_model("models/LoLHnrScout/p_scout1.mdl")
- precache_model("models/LoLHnrScout/v_scout2.mdl")
- precache_model("models/LoLHnrScout/p_scout2.mdl")
- precache_model("models/LoLHnrScout/v_scout3.mdl")
- precache_model("models/LoLHnrScout/p_scout3.mdl")
- precache_model("models/LoLHnrScout/v_scout4.mdl")
- precache_model("models/LoLHnrScout/p_scout4.mdl")
- precache_model("models/LoLHnrScout/v_scout5.mdl")
- precache_model("models/LoLHnrScout/p_scout5.mdl")
- precache_model("models/LoLHnrScout/v_scout6.mdl")
- precache_model("models/LoLHnrScout/p_scout6.mdl")
- precache_model("models/LoLHnrScout/v_scout7.mdl")
- precache_model("models/LoLHnrScout/p_scout7.mdl")
- precache_model("models/LoLHnrScout/v_scout8.mdl")
- precache_model("models/LoLHnrScout/p_scout8.mdl")
- precache_model("models/LoLHnrScout/v_scout9.mdl")
- precache_model("models/LoLHnrScout/p_scout9.mdl")
- precache_model("models/LoLHnrScout/v_scout10.mdl")
- precache_model("models/LoLHnrScout/p_scout10.mdl")
- }
- public plugin_init() {
- register_plugin("ScoutMenu", "1.0", "SerMajor")
- register_clcmd("say /scout", "MenuShow")
- register_event("CurWeapon", "Event_CurWeapon", "be", "1=1");
- }
- public MenuShow(id)
- {
- new menu = menu_create("[LoL] Scout Menu", "MenuHandler") // ?????? , MenuHandler ?????.
- menu_additem(menu, "scout1", "1", 0)
- menu_additem(menu, "scout2", "2", 0)
- menu_additem(menu, "scout3", "3", 0)
- menu_additem(menu, "scout4", "4", 0)
- menu_additem(menu, "scout5", "5", 0)
- menu_additem(menu, "scout6", "6", 0)
- menu_additem(menu, "scout7", "7", 0)
- menu_additem(menu, "scout8", "8", 0)
- menu_additem(menu, "scout9", "9", 0)
- menu_additem(menu, "scout10", "10", 0)
- menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
- menu_display(id, menu, 0)
- }
- public MenuHandler(id, menu, item)
- {
- if( item == MENU_EXIT )
- {
- menu_destroy(menu);
- return PLUGIN_HANDLED;
- }
- new data[6], szName[33];
- new acces, callback;
- menu_item_getinfo(menu, item, acces, data,charsmax(data), szName,charsmax(szName), callback)
- new key = str_to_num(data);
- switch(key)
- {
- case 1: {
- HasScout1WeaponsModel [ id ] = true
- HasScout2WeaponsModel [ id ] = false
- HasScout3WeaponsModel [ id ] = false
- HasScout4WeaponsModel [ id ] = false
- HasScout5WeaponsModel [ id ] = false
- HasScout6WeaponsModel [ id ] = false
- HasScout7WeaponsModel [ id ] = false
- HasScout8WeaponsModel [ id ] = false
- HasScout9WeaponsModel [ id ] = false
- HasScout10WeaponsModel [ id ] = false
- client_print(id, print_chat, "[LoL] U Choose Scout1")
- }
- case 2: {
- HasScout1WeaponsModel [ id ] = false
- HasScout2WeaponsModel [ id ] = true
- HasScout3WeaponsModel [ id ] = false
- HasScout4WeaponsModel [ id ] = false
- HasScout5WeaponsModel [ id ] = false
- HasScout6WeaponsModel [ id ] = false
- HasScout7WeaponsModel [ id ] = false
- HasScout8WeaponsModel [ id ] = false
- HasScout9WeaponsModel [ id ] = false
- HasScout10WeaponsModel [ id ] = false
- return 1;
- client_print(id, print_chat, "[LoL] U Choose Scout2")
- }
- case 3: {
- HasScout1WeaponsModel [ id ] = false
- HasScout2WeaponsModel [ id ] = false
- HasScout3WeaponsModel [ id ] = true
- HasScout4WeaponsModel [ id ] = false
- HasScout5WeaponsModel [ id ] = false
- HasScout6WeaponsModel [ id ] = false
- HasScout7WeaponsModel [ id ] = false
- HasScout8WeaponsModel [ id ] = false
- HasScout9WeaponsModel [ id ] = false
- HasScout10WeaponsModel [ id ] = false
- return 1;
- client_print(id, print_chat, "[LoL] U Choose Scout3")
- }
- case 4: {
- HasScout1WeaponsModel [ id ] = false
- HasScout2WeaponsModel [ id ] = false
- HasScout3WeaponsModel [ id ] = false
- HasScout4WeaponsModel [ id ] = true
- HasScout5WeaponsModel [ id ] = false
- HasScout6WeaponsModel [ id ] = false
- HasScout7WeaponsModel [ id ] = false
- HasScout8WeaponsModel [ id ] = false
- HasScout9WeaponsModel [ id ] = false
- HasScout10WeaponsModel [ id ] = false
- return 1;
- client_print(id, print_chat, "[LoL] U Choose Scout4")
- }
- case 5: {
- HasScout1WeaponsModel [ id ] = false
- HasScout2WeaponsModel [ id ] = false
- HasScout3WeaponsModel [ id ] = false
- HasScout4WeaponsModel [ id ] = false
- HasScout5WeaponsModel [ id ] = true
- HasScout6WeaponsModel [ id ] = false
- HasScout7WeaponsModel [ id ] = false
- HasScout8WeaponsModel [ id ] = false
- HasScout9WeaponsModel [ id ] = false
- HasScout10WeaponsModel [ id ] = false
- return 1;
- client_print(id, print_chat, "[LoL] U Choose Scout5")
- }
- case 6: {
- HasScout1WeaponsModel [ id ] = false
- HasScout2WeaponsModel [ id ] = false
- HasScout3WeaponsModel [ id ] = false
- HasScout4WeaponsModel [ id ] = false
- HasScout5WeaponsModel [ id ] = false
- HasScout6WeaponsModel [ id ] = true
- HasScout7WeaponsModel [ id ] = false
- HasScout8WeaponsModel [ id ] = false
- HasScout9WeaponsModel [ id ] = false
- HasScout10WeaponsModel [ id ] = false
- return 1;
- client_print(id, print_chat, "[LoL] U Choose Scout6")
- }
- case 7: {
- HasScout1WeaponsModel [ id ] = false
- HasScout2WeaponsModel [ id ] = false
- HasScout3WeaponsModel [ id ] = false
- HasScout4WeaponsModel [ id ] = false
- HasScout5WeaponsModel [ id ] = false
- HasScout6WeaponsModel [ id ] = false
- HasScout7WeaponsModel [ id ] = true
- HasScout8WeaponsModel [ id ] = false
- HasScout9WeaponsModel [ id ] = false
- HasScout10WeaponsModel [ id ] = false
- return 1;
- client_print(id, print_chat, "[LoL] U Choose Scout7")
- }
- case 8: {
- HasScout1WeaponsModel [ id ] = false
- HasScout2WeaponsModel [ id ] = false
- HasScout3WeaponsModel [ id ] = false
- HasScout4WeaponsModel [ id ] = false
- HasScout5WeaponsModel [ id ] = false
- HasScout6WeaponsModel [ id ] = false
- HasScout7WeaponsModel [ id ] = false
- HasScout8WeaponsModel [ id ] = true
- HasScout9WeaponsModel [ id ] = false
- HasScout10WeaponsModel [ id ] = false
- return 1;
- client_print(id, print_chat, "[LoL] U Choose Scout8")
- }
- case 9: {
- HasScout1WeaponsModel [ id ] = false
- HasScout2WeaponsModel [ id ] = false
- HasScout3WeaponsModel [ id ] = false
- HasScout4WeaponsModel [ id ] = false
- HasScout5WeaponsModel [ id ] = false
- HasScout6WeaponsModel [ id ] = false
- HasScout7WeaponsModel [ id ] = false
- HasScout8WeaponsModel [ id ] = false
- HasScout9WeaponsModel [ id ] = true
- HasScout10WeaponsModel [ id ] = false
- return 1;
- client_print(id, print_chat, "[LoL] U Choose Scout9")
- }
- case 10: {
- HasScout1WeaponsModel [ id ] = false
- HasScout2WeaponsModel [ id ] = false
- HasScout3WeaponsModel [ id ] = false
- HasScout4WeaponsModel [ id ] = false
- HasScout5WeaponsModel [ id ] = false
- HasScout6WeaponsModel [ id ] = false
- HasScout7WeaponsModel [ id ] = false
- HasScout8WeaponsModel [ id ] = false
- HasScout9WeaponsModel [ id ] = false
- HasScout10WeaponsModel [ id ] = true
- return 1;
- client_print(id, print_chat, "[LoL] U Choose Scout10")
- }
- }
- menu_destroy(menu);
- return PLUGIN_HANDLED;
- }
- public Event_CurWeapon ( id ) {
- new weapon = get_user_weapon ( id )
- if ( HasScout1WeaponsModel [ id ] )
- return
- switch ( weapon ) {
- case CSW_SCOUT : {
- set_pev(id, pev_viewmodel2, "models/LoLHnrScout/v_scout1.mdl")
- set_pev(id, pev_weaponmodel2, "models/LoLHnrScout/p_scout1.mdl")
- }
- }
- }
- public Event_CurWeapon ( id ) {
- new weapon = get_user_weapon ( id )
- if ( HasScout1WeaponsModel [ id ] )
- return
- switch ( weapon ) {
- case CSW_SCOUT : {
- set_pev(id, pev_viewmodel2, "models/LoLHnrScout/v_scout2.mdl")
- set_pev(id, pev_weaponmodel2, "models/LoLHnrScout/p_scout2.mdl")
- }
- }
- }
- if ( HasScout2WeaponsModel [ id ] ) {
- switch ( weapon ) {
- case CSW_scout : {
- set_pev(id, pev_viewmodel2, "models/LoLHnrScout/v_scout2")
- set_pev(id, pev_weaponmodel2, "models/LoLHnrScout/p_scout2")
- }
- }
- }
- if ( HasScout3WeaponsModel [ id ] ) {
- switch ( weapon ) {
- case CSW_scout : {
- set_pev(id, pev_viewmodel2, "models/LoLHnrScout/v_scout3")
- set_pev(id, pev_weaponmodel2, "models/LoLHnrScout/p_scout3")
- }
- }
- }
- if ( HasScout4WeaponsModel [ id ] ) {
- switch ( weapon ) {
- case CSW_scout : {
- set_pev(id, pev_viewmodel2, "models/LoLHnrScout/v_scout4")
- set_pev(id, pev_weaponmodel2, "models/LoLHnrScout/p_scout4")
- }
- }
- }
- if ( HasScout5WeaponsModel [ id ] ) {
- switch ( weapon ) {
- case CSW_scout : {
- set_pev(id, pev_viewmodel2, "models/LoLHnrScout/v_scout5")
- set_pev(id, pev_weaponmodel2, "models/LoLHnrScout/p_scout5")
- }
- }
- }
- if ( HasScout6WeaponsModel [ id ] ) {
- switch ( weapon ) {
- case CSW_scout : {
- set_pev(id, pev_viewmodel2, "models/LoLHnrScout/v_scout6")
- set_pev(id, pev_weaponmodel2, "models/LoLHnrScout/p_scout6")
- }
- }
- }
- if ( HasScout7WeaponsModel [ id ] ) {
- switch ( weapon ) {
- case CSW_scout : {
- set_pev(id, pev_viewmodel2, "models/LoLHnrScout/v_scout7")
- set_pev(id, pev_weaponmodel2, "models/LoLHnrScout/p_scout7")
- }
- }
- }
- if ( HasScout8WeaponsModel [ id ] ) {
- switch ( weapon ) {
- case CSW_scout : {
- set_pev(id, pev_viewmodel2, "models/LoLHnrScout/v_scout8")
- set_pev(id, pev_weaponmodel2, "models/LoLHnrScout/p_scout8")
- }
- }
- }
- if ( HasScout9WeaponsModel [ id ] ) {
- switch ( weapon ) {
- case CSW_scout : {
- set_pev(id, pev_viewmodel2, "models/LoLHnrScout/v_scout9")
- set_pev(id, pev_weaponmodel2, "models/LoLHnrScout/p_scout9")
- }
- }
- }
- if ( HasScout10WeaponsModel [ id ] ) {
- switch ( weapon ) {
- case CSW_scout : {
- set_pev(id, pev_viewmodel2, "models/LoLHnrScout/v_scout10")
- set_pev(id, pev_weaponmodel2, "models/LoLHnrScout/p_scout10")
- }
- }
- }
Add Comment
Please, Sign In to add comment