Mensajes: 22
Temas: 6
Registro en: May 2021
Reputación:
0
Mensajes: 10
Temas: 4
Registro en: Apr 2021
Reputación:
0
Bro como se llama ese plugin? Lo nesecito!!!!
Mensajes: 22
Temas: 6
Registro en: May 2021
Reputación:
0
12/05/2021, 04:39 PM
(Última modificación: 12/05/2021, 04:39 PM por Miguel94 . Edited 1 time in total.)
(12/05/2021, 04:34 PM) HyPeR ツ escribió: Bro como se llama ese plugin? Lo nesecito!!!!
Yo también lo necesito, por eso lo estoy pidiendo aquí . . !!
Mensajes: 17
Temas: 7
Registro en: Apr 2019
Reputación:
1
Mensajes: 39
Temas: 14
Registro en: Apr 2021
Reputación:
0
(13/05/2021, 01:34 AM) RandroidS escribió: yo creo que este es haci (creo, no lo he probado)
https://forums.alliedmods.net/showthread.php?t=167709 No Amigo, no es, ese es un menú de armas para cualquier jugador y solo muestra las armas default, el Menú que yo quiero es para ADM's, El menú trae armas adicionales personalizadas, ejemplo (AK ILLUSION, AK NEON RIDER, AK DRAGON KING, M4 DRAGON COIL ....) OBVIAMENTE SE COLOCA EL MODEL QUE YO SELECCIONE, NO SÉ SI ME EXPLICO, YO TENGO YA LOS MODELS SOLO ME FALTA EL PLUGIN
Mensajes: 128
Temas: 23
Registro en: Jun 2017
Reputación:
4
Y cuanto pagas por el plugin
Mensajes: 25
Temas: 5
Registro en: Jul 2019
Reputación:
0
Veamos
Código PHP:
#include < amxmodx > #include < amxmisc > #include < fun > #include < fakemeta > #include < cstrike > #include < engine > #include < hamsandwich > #pragma semicolon 1 new const g_szPluginName [ ] = "Weapons Menu" ; new const g_szPluginVersion [ ] = "1.0" ; new const g_szPluginAuthor [ ] = "Chema" ; new const g_szChatPrefix [ ] = "^4[^1Tag^4]^1" ; new const g_szWebsiteUrl [ ] = "www.clan.net" ; new const g_szItemMenuSound [ ] = "Ui/buttonclickrelease.wav" ; const WEAPON_NONE = - 1 ; enum _ : eWeaponTypes { WEAPON_FUTURICS , WEAPON_IRONMAN , WEAPON_MONSTER , WEAPON_FIRE , WEAPON_PINK , WEAPON_PLUTON }; enum _ : eWeapon_Struct { WEAPON_CSW , WEAPON_ENT [ 32 ], WEAPON_NAME [ 40 ], WEAPON_VIEWMODEL [ 50 ], WEAPON_PLAYERMODEL [ 50 ], WEAPON_BULLETS , URL [ 50 ] }; new const g_szWeapons [ _ : eWeaponTypes ][ _ : eWeapon_Struct ] = { { CSW_AK47 , "weapon_ak47" , "AK47 - Futurics" , "models/armasn/v_ak47_1.mdl" , "models/armasn/p_ak47_1.mdl" , 90 , "URL.com" }, { CSW_AK47 , "weapon_ak47" , "AK47 - Iron Man" , "models/armasn/v_ak47_2.mdl" , "models/armasn/p_ak47_2.mdl" , 90 , "URL.com" }, // 1 { CSW_M4A1 , "weapon_m4a1" , "M4a1 - Monster" , "models/armasn/v_m4a1_v1.mdl" , "models/armasn/p_m4a1_v1.mdl" , 90 , "URL.com" }, // 2 { CSW_M4A1 , "weapon_m4a1" , "M4a1 - Fire" , "models/armasn/v_m4a1_3.mdl" , "models/armasn/p_m4a1_v3.mdl" , 90 , "URL.com" }, // 3 { CSW_AWP , "weapon_awp" , "Awp - Pink" , "models/armasn/v_awp_1.mdl" , "models/armasn/p_awp_1.mdl" , 30 , "URL.com" }, // 4 { CSW_AWP , "weapon_awp" , "Awp - Pluton" , "models/armasn/v_awp_2.mdl" , "models/armasn/p_awp_2.mdl" , 30 , "URL.com" } // 5 }; new g_iWeaponPreview [ 33 ]; new g_iWeaponSelected [ 33 ]; public plugin_precache ( ) { for( new i = 0 ; i < sizeof g_szWeapons ; i ++) { precache_model ( g_szWeapons [ i ][ WEAPON_VIEWMODEL ] ); precache_model ( g_szWeapons [ i ][ WEAPON_PLAYERMODEL ] ); } } public plugin_init ( ) { /* Register Plugin & Cvars */ register_plugin ( g_szPluginName , g_szPluginVersion , g_szPluginAuthor ); /* Events & LogEvents */ register_event ( "CurWeapon" , "Event_CurWeapon" , "be" , "1=1" ); /* Forwards */ register_forward ( FM_SetModel , "Forward_SetModel" ); /* Hamsandwichs */ RegisterHam ( Ham_Spawn , "player" , "OnPlayer_SpawnPost" , true ); /* Client-related Stuff */ register_clcmd ( "radio1" , "ClientCommand_CheckMenu" ); register_clcmd ( "drop" , "ClientCommand_BlockDrop" ); /* Menus */ register_menu ( "Weapons Menu" , 1023 , "HandlerWeaponsMenu" ); } /* Events & LogEvents */ public Event_CurWeapon ( const iPlayerID ) { new iWeaponID = read_data ( 2 ); static iUserFlags ; iUserFlags = get_user_flags ( iPlayerID ); if( g_iWeaponSelected [ iPlayerID ] == WEAPON_NONE || iWeaponID != g_szWeapons [ g_iWeaponSelected [ iPlayerID ] ][ WEAPON_CSW ] ) return PLUGIN_CONTINUE ; if( iUserFlags & ADMIN_RCON ) { entity_set_string ( iPlayerID , EV_SZ_viewmodel , g_szWeapons [ g_iWeaponSelected [ iPlayerID ] ][ WEAPON_VIEWMODEL ] ); entity_set_string ( iPlayerID , EV_SZ_weaponmodel , g_szWeapons [ g_iWeaponSelected [ iPlayerID ] ][ WEAPON_PLAYERMODEL ] ); } return PLUGIN_CONTINUE ; } /* Forwards */ public Forward_SetModel ( const iEntity , const szModel [ ] ) { if( equal ( szModel , "models/w_awp.mdl" ) ) { set_pev ( iEntity , pev_nextthink , get_gametime ( ) + 0.01 ); return; } } /* Hamsandwichs */ public OnPlayer_SpawnPost ( const iPlayerID ) { if( ! is_user_alive ( iPlayerID ) ) return PLUGIN_CONTINUE ; if( g_iWeaponSelected [ iPlayerID ] != WEAPON_NONE ) OnPlayer_SelectedWeapons ( iPlayerID ); return PLUGIN_HANDLED ; } /* Client-related Stuff */ public client_putinserver ( iPlayerID ) { g_iWeaponSelected [ iPlayerID ] = WEAPON_NONE ; } public ClientCommand_BlockDrop ( const iPlayerID ) { new iWeaponID = get_user_weapon ( iPlayerID ); if( iWeaponID == CSW_AWP && ( g_iWeaponSelected [ iPlayerID ] == WEAPON_PINK || g_iWeaponSelected [ iPlayerID ] == WEAPON_PLUTON ) ) return PLUGIN_HANDLED ; return PLUGIN_CONTINUE ; } public ClientCommand_CheckMenu ( const iPlayerID ) { static iUserFlags ; iUserFlags = get_user_flags ( iPlayerID ); if( iUserFlags & ADMIN_RCON ) ShowMenu_Weapons ( iPlayerID ); else ShowMenu_Information ( iPlayerID ); return PLUGIN_HANDLED ; } /* Menus */ public ShowMenu_Weapons ( const iPlayerID ) { new iMenu = menu_create ( "Armas menu." , "HandlerMenu_Weapons" ); new szBuffer [ 52 ]; for( new i = 0 ; i < sizeof g_szWeapons ; i ++ ) { format ( szBuffer , 51 , "%s%s" , g_szWeapons [ i ][ WEAPON_NAME ], g_iWeaponSelected [ iPlayerID ] == i ? " \r[EQUIPADA]" : "" ); menu_additem ( iMenu , szBuffer , . callback = menu_makecallback ( "CallbackWeaponsMenu" ) ); } menu_display ( iPlayerID , iMenu ); return PLUGIN_HANDLED ; } public CallbackWeaponsMenu ( const iPlayerID , const iMenu , const iItem ) { if( g_iWeaponSelected [ iPlayerID ] == iItem ) return ITEM_DISABLED ; return ITEM_ENABLED ; } public ShowMenu_Information ( const iPlayerID ) { new iMenu = menu_create ( "\d***\r Menu server #1\d***" , "HandlerMenu_Information" ); menu_additem ( iMenu , "\r* \wMenú de \yARMAS PREMIUM." ); menu_display ( iPlayerID , iMenu ); return PLUGIN_HANDLED ; } public HandlerMenu_Information ( const iPlayerID , const iMenu , const iItem ) { if( iItem == MENU_EXIT ) { menu_destroy ( iMenu ); return PLUGIN_HANDLED ; } return PLUGIN_HANDLED ; } public HandlerMenu_Weapons ( const iPlayerID , const iMenu , const iItem ) { if( iItem == MENU_EXIT ) { menu_destroy ( iMenu ); return PLUGIN_HANDLED ; } g_iWeaponPreview [ iPlayerID ] = iItem ; ShowMenu_SelectedWeapon ( iPlayerID ); return PLUGIN_HANDLED ; } public ShowMenu_SelectedWeapon ( const iPlayerID ) { static szBuffer [ 1024 ], iLen , iKeys ; iLen = 0 ; iLen += formatex ( szBuffer [ iLen ], charsmax ( szBuffer ) - iLen , "\d%s^n\yArma seleccionada^n^n" , g_szWebsiteUrl ); iLen += formatex ( szBuffer [ iLen ], charsmax ( szBuffer ) - iLen , "\r* \d- \r%s^n^n" , g_szWeapons [ g_iWeaponPreview [ iPlayerID ] ][ WEAPON_NAME ] ); iLen += formatex ( szBuffer [ iLen ], charsmax ( szBuffer ) - iLen , "\r1. \wElegir^n" ); iLen += formatex ( szBuffer [ iLen ], charsmax ( szBuffer ) - iLen , "\r2. \wVista previa^n" ); iLen += formatex ( szBuffer [ iLen ], charsmax ( szBuffer ) - iLen , "\r3. \wAuto equipar^n^n" ); iLen += formatex ( szBuffer [ iLen ], charsmax ( szBuffer ) - iLen , "\r4. \wRegresar^n" ); iLen += formatex ( szBuffer [ iLen ], charsmax ( szBuffer ) - iLen , "\r0. \wCerrar" ); iKeys = ( 1 << 0 )|( 1 << 1 )|( 1 << 2 )|( 1 << 3 )|( 1 << 9 ); show_menu ( iPlayerID , iKeys , szBuffer , - 1 , "Weapons Menu" ); return PLUGIN_HANDLED ; } public HandlerWeaponsMenu ( const iPlayerID , const iKey ) { switch( iKey ) { case 0 : g_iWeaponSelected [ iPlayerID ] = g_iWeaponPreview [ iPlayerID ], OnPlayer_SelectedWeapons ( iPlayerID ); case 1 : show_motd ( iPlayerID , g_szWeapons [ g_iWeaponPreview [ iPlayerID ] ][ URL ]); case 2 : client_print_color ( iPlayerID , 0 , "%s Este arma será automaticamente equipada en cada respawn!" , g_szChatPrefix ), g_iWeaponSelected [ iPlayerID ] = g_iWeaponPreview [ iPlayerID ], OnPlayer_SelectedWeapons ( iPlayerID ); case 3 : g_iWeaponSelected [ iPlayerID ] = WEAPON_NONE , ClientCommand_CheckMenu ( iPlayerID ); case 9 : g_iWeaponSelected [ iPlayerID ] = WEAPON_NONE ; } if( iKey != 9 ) client_cmd ( iPlayerID , "spk ^" % s ^ "" , g_szItemMenuSound ); return PLUGIN_HANDLED ; } /* Private functions & Stocks */ OnPlayer_SelectedWeapons ( const iPlayerID ) { strip_user_weapons ( iPlayerID ); give_item ( iPlayerID , "weapon_knife" ); give_item ( iPlayerID , g_szWeapons [ g_iWeaponSelected [ iPlayerID ] ][ WEAPON_ENT ] ); cs_set_user_bpammo ( iPlayerID , g_szWeapons [ g_iWeaponSelected [ iPlayerID ] ][ WEAPON_CSW ], g_szWeapons [ g_iWeaponSelected [ iPlayerID ] ][ WEAPON_BULLETS ] ); client_print_color ( iPlayerID , 0 , "%s Has elegido: ^4%s" , g_szChatPrefix , g_szWeapons [ g_iWeaponSelected [ iPlayerID ] ][ WEAPON_NAME ] ); return PLUGIN_HANDLED ; }
Cita: Cruzadas incompletas en penínsulas desiertas.
Mensajes: 22
Temas: 6
Registro en: May 2021
Reputación:
0
(13/05/2021, 04:15 AM) TheKingヅ escribió: Veamos
Código PHP:
#include < amxmodx > #include < amxmisc > #include < fun > #include < fakemeta > #include < cstrike > #include < engine > #include < hamsandwich > #pragma semicolon 1 new const g_szPluginName [ ] = "Weapons Menu" ; new const g_szPluginVersion [ ] = "1.0" ; new const g_szPluginAuthor [ ] = "Chema" ; new const g_szChatPrefix [ ] = "^4[^1Tag^4]^1" ; new const g_szWebsiteUrl [ ] = "www.clan.net" ; new const g_szItemMenuSound [ ] = "Ui/buttonclickrelease.wav" ; const WEAPON_NONE = - 1 ; enum _ : eWeaponTypes { WEAPON_FUTURICS , WEAPON_IRONMAN , WEAPON_MONSTER , WEAPON_FIRE , WEAPON_PINK , WEAPON_PLUTON }; enum _ : eWeapon_Struct { WEAPON_CSW , WEAPON_ENT [ 32 ], WEAPON_NAME [ 40 ], WEAPON_VIEWMODEL [ 50 ], WEAPON_PLAYERMODEL [ 50 ], WEAPON_BULLETS , URL [ 50 ] }; new const g_szWeapons [ _ : eWeaponTypes ][ _ : eWeapon_Struct ] = { { CSW_AK47 , "weapon_ak47" , "AK47 - Futurics" , "models/armasn/v_ak47_1.mdl" , "models/armasn/p_ak47_1.mdl" , 90 , "URL.com" }, { CSW_AK47 , "weapon_ak47" , "AK47 - Iron Man" , "models/armasn/v_ak47_2.mdl" , "models/armasn/p_ak47_2.mdl" , 90 , "URL.com" }, // 1 { CSW_M4A1 , "weapon_m4a1" , "M4a1 - Monster" , "models/armasn/v_m4a1_v1.mdl" , "models/armasn/p_m4a1_v1.mdl" , 90 , "URL.com" }, // 2 { CSW_M4A1 , "weapon_m4a1" , "M4a1 - Fire" , "models/armasn/v_m4a1_3.mdl" , "models/armasn/p_m4a1_v3.mdl" , 90 , "URL.com" }, // 3 { CSW_AWP , "weapon_awp" , "Awp - Pink" , "models/armasn/v_awp_1.mdl" , "models/armasn/p_awp_1.mdl" , 30 , "URL.com" }, // 4 { CSW_AWP , "weapon_awp" , "Awp - Pluton" , "models/armasn/v_awp_2.mdl" , "models/armasn/p_awp_2.mdl" , 30 , "URL.com" } // 5 }; new g_iWeaponPreview [ 33 ]; new g_iWeaponSelected [ 33 ]; public plugin_precache ( ) { for( new i = 0 ; i < sizeof g_szWeapons ; i ++) { precache_model ( g_szWeapons [ i ][ WEAPON_VIEWMODEL ] ); precache_model ( g_szWeapons [ i ][ WEAPON_PLAYERMODEL ] ); } } public plugin_init ( ) { /* Register Plugin & Cvars */ register_plugin ( g_szPluginName , g_szPluginVersion , g_szPluginAuthor ); /* Events & LogEvents */ register_event ( "CurWeapon" , "Event_CurWeapon" , "be" , "1=1" ); /* Forwards */ register_forward ( FM_SetModel , "Forward_SetModel" ); /* Hamsandwichs */ RegisterHam ( Ham_Spawn , "player" , "OnPlayer_SpawnPost" , true ); /* Client-related Stuff */ register_clcmd ( "radio1" , "ClientCommand_CheckMenu" ); register_clcmd ( "drop" , "ClientCommand_BlockDrop" ); /* Menus */ register_menu ( "Weapons Menu" , 1023 , "HandlerWeaponsMenu" ); } /* Events & LogEvents */ public Event_CurWeapon ( const iPlayerID ) { new iWeaponID = read_data ( 2 ); static iUserFlags ; iUserFlags = get_user_flags ( iPlayerID ); if( g_iWeaponSelected [ iPlayerID ] == WEAPON_NONE || iWeaponID != g_szWeapons [ g_iWeaponSelected [ iPlayerID ] ][ WEAPON_CSW ] ) return PLUGIN_CONTINUE ; if( iUserFlags & ADMIN_RCON ) { entity_set_string ( iPlayerID , EV_SZ_viewmodel , g_szWeapons [ g_iWeaponSelected [ iPlayerID ] ][ WEAPON_VIEWMODEL ] ); entity_set_string ( iPlayerID , EV_SZ_weaponmodel , g_szWeapons [ g_iWeaponSelected [ iPlayerID ] ][ WEAPON_PLAYERMODEL ] ); } return PLUGIN_CONTINUE ; } /* Forwards */ public Forward_SetModel ( const iEntity , const szModel [ ] ) { if( equal ( szModel , "models/w_awp.mdl" ) ) { set_pev ( iEntity , pev_nextthink , get_gametime ( ) + 0.01 ); return; } } /* Hamsandwichs */ public OnPlayer_SpawnPost ( const iPlayerID ) { if( ! is_user_alive ( iPlayerID ) ) return PLUGIN_CONTINUE ; if( g_iWeaponSelected [ iPlayerID ] != WEAPON_NONE ) OnPlayer_SelectedWeapons ( iPlayerID ); return PLUGIN_HANDLED ; } /* Client-related Stuff */ public client_putinserver ( iPlayerID ) { g_iWeaponSelected [ iPlayerID ] = WEAPON_NONE ; } public ClientCommand_BlockDrop ( const iPlayerID ) { new iWeaponID = get_user_weapon ( iPlayerID ); if( iWeaponID == CSW_AWP && ( g_iWeaponSelected [ iPlayerID ] == WEAPON_PINK || g_iWeaponSelected [ iPlayerID ] == WEAPON_PLUTON ) ) return PLUGIN_HANDLED ; return PLUGIN_CONTINUE ; } public ClientCommand_CheckMenu ( const iPlayerID ) { static iUserFlags ; iUserFlags = get_user_flags ( iPlayerID ); if( iUserFlags & ADMIN_RCON ) ShowMenu_Weapons ( iPlayerID ); else ShowMenu_Information ( iPlayerID ); return PLUGIN_HANDLED ; } /* Menus */ public ShowMenu_Weapons ( const iPlayerID ) { new iMenu = menu_create ( "Armas menu." , "HandlerMenu_Weapons" ); new szBuffer [ 52 ]; for( new i = 0 ; i < sizeof g_szWeapons ; i ++ ) { format ( szBuffer , 51 , "%s%s" , g_szWeapons [ i ][ WEAPON_NAME ], g_iWeaponSelected [ iPlayerID ] == i ? " \r[EQUIPADA]" : "" ); menu_additem ( iMenu , szBuffer , . callback = menu_makecallback ( "CallbackWeaponsMenu" ) ); } menu_display ( iPlayerID , iMenu ); return PLUGIN_HANDLED ; } public CallbackWeaponsMenu ( const iPlayerID , const iMenu , const iItem ) { if( g_iWeaponSelected [ iPlayerID ] == iItem ) return ITEM_DISABLED ; return ITEM_ENABLED ; } public ShowMenu_Information ( const iPlayerID ) { new iMenu = menu_create ( "\d***\r Menu server #1\d***" , "HandlerMenu_Information" ); menu_additem ( iMenu , "\r* \wMenú de \yARMAS PREMIUM." ); menu_display ( iPlayerID , iMenu ); return PLUGIN_HANDLED ; } public HandlerMenu_Information ( const iPlayerID , const iMenu , const iItem ) { if( iItem == MENU_EXIT ) { menu_destroy ( iMenu ); return PLUGIN_HANDLED ; } return PLUGIN_HANDLED ; } public HandlerMenu_Weapons ( const iPlayerID , const iMenu , const iItem ) { if( iItem == MENU_EXIT ) { menu_destroy ( iMenu ); return PLUGIN_HANDLED ; } g_iWeaponPreview [ iPlayerID ] = iItem ; ShowMenu_SelectedWeapon ( iPlayerID ); return PLUGIN_HANDLED ; } public ShowMenu_SelectedWeapon ( const iPlayerID ) { static szBuffer [ 1024 ], iLen , iKeys ; iLen = 0 ; iLen += formatex ( szBuffer [ iLen ], charsmax ( szBuffer ) - iLen , "\d%s^n\yArma seleccionada^n^n" , g_szWebsiteUrl ); iLen += formatex ( szBuffer [ iLen ], charsmax ( szBuffer ) - iLen , "\r* \d- \r%s^n^n" , g_szWeapons [ g_iWeaponPreview [ iPlayerID ] ][ WEAPON_NAME ] ); iLen += formatex ( szBuffer [ iLen ], charsmax ( szBuffer ) - iLen , "\r1. \wElegir^n" ); iLen += formatex ( szBuffer [ iLen ], charsmax ( szBuffer ) - iLen , "\r2. \wVista previa^n" ); iLen += formatex ( szBuffer [ iLen ], charsmax ( szBuffer ) - iLen , "\r3. \wAuto equipar^n^n" ); iLen += formatex ( szBuffer [ iLen ], charsmax ( szBuffer ) - iLen , "\r4. \wRegresar^n" ); iLen += formatex ( szBuffer [ iLen ], charsmax ( szBuffer ) - iLen , "\r0. \wCerrar" ); iKeys = ( 1 << 0 )|( 1 << 1 )|( 1 << 2 )|( 1 << 3 )|( 1 << 9 ); show_menu ( iPlayerID , iKeys , szBuffer , - 1 , "Weapons Menu" ); return PLUGIN_HANDLED ; } public HandlerWeaponsMenu ( const iPlayerID , const iKey ) { switch( iKey ) { case 0 : g_iWeaponSelected [ iPlayerID ] = g_iWeaponPreview [ iPlayerID ], OnPlayer_SelectedWeapons ( iPlayerID ); case 1 : show_motd ( iPlayerID , g_szWeapons [ g_iWeaponPreview [ iPlayerID ] ][ URL ]); case 2 : client_print_color ( iPlayerID , 0 , "%s Este arma será automaticamente equipada en cada respawn!" , g_szChatPrefix ), g_iWeaponSelected [ iPlayerID ] = g_iWeaponPreview [ iPlayerID ], OnPlayer_SelectedWeapons ( iPlayerID ); case 3 : g_iWeaponSelected [ iPlayerID ] = WEAPON_NONE , ClientCommand_CheckMenu ( iPlayerID ); case 9 : g_iWeaponSelected [ iPlayerID ] = WEAPON_NONE ; } if( iKey != 9 ) client_cmd ( iPlayerID , "spk ^" % s ^ "" , g_szItemMenuSound ); return PLUGIN_HANDLED ; } /* Private functions & Stocks */ OnPlayer_SelectedWeapons ( const iPlayerID ) { strip_user_weapons ( iPlayerID ); give_item ( iPlayerID , "weapon_knife" ); give_item ( iPlayerID , g_szWeapons [ g_iWeaponSelected [ iPlayerID ] ][ WEAPON_ENT ] ); cs_set_user_bpammo ( iPlayerID , g_szWeapons [ g_iWeaponSelected [ iPlayerID ] ][ WEAPON_CSW ], g_szWeapons [ g_iWeaponSelected [ iPlayerID ] ][ WEAPON_BULLETS ] ); client_print_color ( iPlayerID , 0 , "%s Has elegido: ^4%s" , g_szChatPrefix , g_szWeapons [ g_iWeaponSelected [ iPlayerID ] ][ WEAPON_NAME ] ); return PLUGIN_HANDLED ; }
Muchas gracias TheKing, ahora lo pruebo y te digo
Mensajes: 448
Temas: 38
Registro en: May 2020
Reputación:
19
(13/05/2021, 03:11 AM) LeanPPP escribió: Y cuanto pagas por el pluginx2
https://amxmodx-es.com/showthread.php?tid=23905
Mensajes: 22
Temas: 6
Registro en: May 2021
Reputación:
0
13/05/2021, 10:17 AM
(Última modificación: 13/05/2021, 08:32 PM por Miguel94 .)
(13/05/2021, 09:48 AM) [N]drs escribió: x2
https://amxmodx-es.com/showthread.php?tid=23905
Muchas gracias, la verdad no tengo dinero para pagar por el plugin,
pero gracias de todas formas, Probaré la opción de TheKing
(13/05/2021, 04:15 AM) TheKingヅ escribió: Veamos
Código PHP:
#include < amxmodx > #include < amxmisc > #include < fun > #include < fakemeta > #include < cstrike > #include < engine > #include < hamsandwich > #pragma semicolon 1 new const g_szPluginName [ ] = "Weapons Menu" ; new const g_szPluginVersion [ ] = "1.0" ; new const g_szPluginAuthor [ ] = "Chema" ; new const g_szChatPrefix [ ] = "^4[^1Tag^4]^1" ; new const g_szWebsiteUrl [ ] = "www.clan.net" ; new const g_szItemMenuSound [ ] = "Ui/buttonclickrelease.wav" ; const WEAPON_NONE = - 1 ; enum _ : eWeaponTypes { WEAPON_FUTURICS , WEAPON_IRONMAN , WEAPON_MONSTER , WEAPON_FIRE , WEAPON_PINK , WEAPON_PLUTON }; enum _ : eWeapon_Struct { WEAPON_CSW , WEAPON_ENT [ 32 ], WEAPON_NAME [ 40 ], WEAPON_VIEWMODEL [ 50 ], WEAPON_PLAYERMODEL [ 50 ], WEAPON_BULLETS , URL [ 50 ] }; new const g_szWeapons [ _ : eWeaponTypes ][ _ : eWeapon_Struct ] = { { CSW_AK47 , "weapon_ak47" , "AK47 - Futurics" , "models/armasn/v_ak47_1.mdl" , "models/armasn/p_ak47_1.mdl" , 90 , "URL.com" }, { CSW_AK47 , "weapon_ak47" , "AK47 - Iron Man" , "models/armasn/v_ak47_2.mdl" , "models/armasn/p_ak47_2.mdl" , 90 , "URL.com" }, // 1 { CSW_M4A1 , "weapon_m4a1" , "M4a1 - Monster" , "models/armasn/v_m4a1_v1.mdl" , "models/armasn/p_m4a1_v1.mdl" , 90 , "URL.com" }, // 2 { CSW_M4A1 , "weapon_m4a1" , "M4a1 - Fire" , "models/armasn/v_m4a1_3.mdl" , "models/armasn/p_m4a1_v3.mdl" , 90 , "URL.com" }, // 3 { CSW_AWP , "weapon_awp" , "Awp - Pink" , "models/armasn/v_awp_1.mdl" , "models/armasn/p_awp_1.mdl" , 30 , "URL.com" }, // 4 { CSW_AWP , "weapon_awp" , "Awp - Pluton" , "models/armasn/v_awp_2.mdl" , "models/armasn/p_awp_2.mdl" , 30 , "URL.com" } // 5 }; new g_iWeaponPreview [ 33 ]; new g_iWeaponSelected [ 33 ]; public plugin_precache ( ) { for( new i = 0 ; i < sizeof g_szWeapons ; i ++) { precache_model ( g_szWeapons [ i ][ WEAPON_VIEWMODEL ] ); precache_model ( g_szWeapons [ i ][ WEAPON_PLAYERMODEL ] ); } } public plugin_init ( ) { /* Register Plugin & Cvars */ register_plugin ( g_szPluginName , g_szPluginVersion , g_szPluginAuthor ); /* Events & LogEvents */ register_event ( "CurWeapon" , "Event_CurWeapon" , "be" , "1=1" ); /* Forwards */ register_forward ( FM_SetModel , "Forward_SetModel" ); /* Hamsandwichs */ RegisterHam ( Ham_Spawn , "player" , "OnPlayer_SpawnPost" , true ); /* Client-related Stuff */ register_clcmd ( "radio1" , "ClientCommand_CheckMenu" ); register_clcmd ( "drop" , "ClientCommand_BlockDrop" ); /* Menus */ register_menu ( "Weapons Menu" , 1023 , "HandlerWeaponsMenu" ); } /* Events & LogEvents */ public Event_CurWeapon ( const iPlayerID ) { new iWeaponID = read_data ( 2 ); static iUserFlags ; iUserFlags = get_user_flags ( iPlayerID ); if( g_iWeaponSelected [ iPlayerID ] == WEAPON_NONE || iWeaponID != g_szWeapons [ g_iWeaponSelected [ iPlayerID ] ][ WEAPON_CSW ] ) return PLUGIN_CONTINUE ; if( iUserFlags & ADMIN_RCON ) { entity_set_string ( iPlayerID , EV_SZ_viewmodel , g_szWeapons [ g_iWeaponSelected [ iPlayerID ] ][ WEAPON_VIEWMODEL ] ); entity_set_string ( iPlayerID , EV_SZ_weaponmodel , g_szWeapons [ g_iWeaponSelected [ iPlayerID ] ][ WEAPON_PLAYERMODEL ] ); } return PLUGIN_CONTINUE ; } /* Forwards */ public Forward_SetModel ( const iEntity , const szModel [ ] ) { if( equal ( szModel , "models/w_awp.mdl" ) ) { set_pev ( iEntity , pev_nextthink , get_gametime ( ) + 0.01 ); return; } } /* Hamsandwichs */ public OnPlayer_SpawnPost ( const iPlayerID ) { if( ! is_user_alive ( iPlayerID ) ) return PLUGIN_CONTINUE ; if( g_iWeaponSelected [ iPlayerID ] != WEAPON_NONE ) OnPlayer_SelectedWeapons ( iPlayerID ); return PLUGIN_HANDLED ; } /* Client-related Stuff */ public client_putinserver ( iPlayerID ) { g_iWeaponSelected [ iPlayerID ] = WEAPON_NONE ; } public ClientCommand_BlockDrop ( const iPlayerID ) { new iWeaponID = get_user_weapon ( iPlayerID ); if( iWeaponID == CSW_AWP && ( g_iWeaponSelected [ iPlayerID ] == WEAPON_PINK || g_iWeaponSelected [ iPlayerID ] == WEAPON_PLUTON ) ) return PLUGIN_HANDLED ; return PLUGIN_CONTINUE ; } public ClientCommand_CheckMenu ( const iPlayerID ) { static iUserFlags ; iUserFlags = get_user_flags ( iPlayerID ); if( iUserFlags & ADMIN_RCON ) ShowMenu_Weapons ( iPlayerID ); else ShowMenu_Information ( iPlayerID ); return PLUGIN_HANDLED ; } /* Menus */ public ShowMenu_Weapons ( const iPlayerID ) { new iMenu = menu_create ( "Armas menu." , "HandlerMenu_Weapons" ); new szBuffer [ 52 ]; for( new i = 0 ; i < sizeof g_szWeapons ; i ++ ) { format ( szBuffer , 51 , "%s%s" , g_szWeapons [ i ][ WEAPON_NAME ], g_iWeaponSelected [ iPlayerID ] == i ? " \r[EQUIPADA]" : "" ); menu_additem ( iMenu , szBuffer , . callback = menu_makecallback ( "CallbackWeaponsMenu" ) ); } menu_display ( iPlayerID , iMenu ); return PLUGIN_HANDLED ; } public CallbackWeaponsMenu ( const iPlayerID , const iMenu , const iItem ) { if( g_iWeaponSelected [ iPlayerID ] == iItem ) return ITEM_DISABLED ; return ITEM_ENABLED ; } public ShowMenu_Information ( const iPlayerID ) { new iMenu = menu_create ( "\d***\r Menu server #1\d***" , "HandlerMenu_Information" ); menu_additem ( iMenu , "\r* \wMenú de \yARMAS PREMIUM." ); menu_display ( iPlayerID , iMenu ); return PLUGIN_HANDLED ; } public HandlerMenu_Information ( const iPlayerID , const iMenu , const iItem ) { if( iItem == MENU_EXIT ) { menu_destroy ( iMenu ); return PLUGIN_HANDLED ; } return PLUGIN_HANDLED ; } public HandlerMenu_Weapons ( const iPlayerID , const iMenu , const iItem ) { if( iItem == MENU_EXIT ) { menu_destroy ( iMenu ); return PLUGIN_HANDLED ; } g_iWeaponPreview [ iPlayerID ] = iItem ; ShowMenu_SelectedWeapon ( iPlayerID ); return PLUGIN_HANDLED ; } public ShowMenu_SelectedWeapon ( const iPlayerID ) { static szBuffer [ 1024 ], iLen , iKeys ; iLen = 0 ; iLen += formatex ( szBuffer [ iLen ], charsmax ( szBuffer ) - iLen , "\d%s^n\yArma seleccionada^n^n" , g_szWebsiteUrl ); iLen += formatex ( szBuffer [ iLen ], charsmax ( szBuffer ) - iLen , "\r* \d- \r%s^n^n" , g_szWeapons [ g_iWeaponPreview [ iPlayerID ] ][ WEAPON_NAME ] ); iLen += formatex ( szBuffer [ iLen ], charsmax ( szBuffer ) - iLen , "\r1. \wElegir^n" ); iLen += formatex ( szBuffer [ iLen ], charsmax ( szBuffer ) - iLen , "\r2. \wVista previa^n" ); iLen += formatex ( szBuffer [ iLen ], charsmax ( szBuffer ) - iLen , "\r3. \wAuto equipar^n^n" ); iLen += formatex ( szBuffer [ iLen ], charsmax ( szBuffer ) - iLen , "\r4. \wRegresar^n" ); iLen += formatex ( szBuffer [ iLen ], charsmax ( szBuffer ) - iLen , "\r0. \wCerrar" ); iKeys = ( 1 << 0 )|( 1 << 1 )|( 1 << 2 )|( 1 << 3 )|( 1 << 9 ); show_menu ( iPlayerID , iKeys , szBuffer , - 1 , "Weapons Menu" ); return PLUGIN_HANDLED ; } public HandlerWeaponsMenu ( const iPlayerID , const iKey ) { switch( iKey ) { case 0 : g_iWeaponSelected [ iPlayerID ] = g_iWeaponPreview [ iPlayerID ], OnPlayer_SelectedWeapons ( iPlayerID ); case 1 : show_motd ( iPlayerID , g_szWeapons [ g_iWeaponPreview [ iPlayerID ] ][ URL ]); case 2 : client_print_color ( iPlayerID , 0 , "%s Este arma será automaticamente equipada en cada respawn!" , g_szChatPrefix ), g_iWeaponSelected [ iPlayerID ] = g_iWeaponPreview [ iPlayerID ], OnPlayer_SelectedWeapons ( iPlayerID ); case 3 : g_iWeaponSelected [ iPlayerID ] = WEAPON_NONE , ClientCommand_CheckMenu ( iPlayerID ); case 9 : g_iWeaponSelected [ iPlayerID ] = WEAPON_NONE ; } if( iKey != 9 ) client_cmd ( iPlayerID , "spk ^" % s ^ "" , g_szItemMenuSound ); return PLUGIN_HANDLED ; } /* Private functions & Stocks */ OnPlayer_SelectedWeapons ( const iPlayerID ) { strip_user_weapons ( iPlayerID ); give_item ( iPlayerID , "weapon_knife" ); give_item ( iPlayerID , g_szWeapons [ g_iWeaponSelected [ iPlayerID ] ][ WEAPON_ENT ] ); cs_set_user_bpammo ( iPlayerID , g_szWeapons [ g_iWeaponSelected [ iPlayerID ] ][ WEAPON_CSW ], g_szWeapons [ g_iWeaponSelected [ iPlayerID ] ][ WEAPON_BULLETS ] ); client_print_color ( iPlayerID , 0 , "%s Has elegido: ^4%s" , g_szChatPrefix , g_szWeapons [ g_iWeaponSelected [ iPlayerID ] ][ WEAPON_NAME ] ); return PLUGIN_HANDLED ; }
Si sirve el plugin, Pero hay unos cambios que quisiera hacerle, si se puede claro, 1, La Funcion de Autoequipar o no, ya que la tiene automatica, 2 Que al seleccionar alguna arma solo me quite la primaria, ya que quita todo y solo me da el arma seleccionada y un knife, 3 que cuando dropee el arma primaria se desaparezca, y 4 La funcion de Autoequipar o no será que me puedes ayudar TheKing?
Mensajes: 22
Temas: 6
Registro en: May 2021
Reputación:
0
(13/05/2021, 03:11 AM) LeanPPP escribió: Y cuanto pagas por el plugin
Cuanto pides por ese plugin?
Mensajes: 531
Temas: 14
Registro en: Mar 2017
Reputación:
9
(12/05/2021, 04:34 PM) HyPeR ツ escribió: Bro como se llama ese plugin? Lo nesecito!!!!
Manda mensaje por privado y te lo paso gratis.
Mensajes: 22
Temas: 6
Registro en: May 2021
Reputación:
0
20/05/2021, 05:55 PM
(Última modificación: 21/05/2021, 01:19 AM por Miguel94 .)
(20/05/2021, 05:23 PM) Kross escribió: Manda mensaje por privado y te lo paso gratis.
Ahí te envie al privado Amigo kross
(20/05/2021, 05:23 PM) Kross escribió: Manda mensaje por privado y te lo paso gratis.
.... HOLAAA?
Mensajes: 39
Temas: 14
Registro en: Apr 2021
Reputación:
0
SI ALGUIEN TIENE ESTE PLUGIN, Y PUEDE AYUDAR CON ÉL O SI ES DE PAGARLO POR FAVOR..
Mensajes: 448
Temas: 38
Registro en: May 2020
Reputación:
19
(25/05/2021, 03:14 AM) gmartinez escribió: SI ALGUIEN TIENE ESTE PLUGIN, Y PUEDE AYUDAR CON ÉL O SI ES DE PAGARLO POR FAVOR..
Si estás dispuesto a pagar a alguien que te programe ese plugin, contáctame por privado