Mensajes: 20
Temas: 6
Registro en: Mar 2021
Reputación:
0
27/04/2021, 11:08 AM
Buenas gente, en esta ocasión busco un plugin que me permita cambiar 3 skins por arma, ósea 3 skins de ak47, 3 skins de awp, etc, que al ingresar sea todos los skins default pero si desea alguien cambiar su skins escriba por ejemplo /skins y le permita seleccionar 1 de esas 3 opciones. Algo así como el menú de Vips pero que este se configure solo por flags, si el player tiene la flag E o M pueda activar ese menú.
Un ejemplo de como podría ser el menú de skins que comento. (
https://i.ibb.co/1rNLR0d/pvdHyaI.png )
Que no necesite kills ni nada adicional solo de las flags de ser posible, la carpeta donde tengo las skins es "models/skins/" gracias y disculpa por pedir tanto
Mensajes: 300
Temas: 14
Registro en: Dec 2017
Reputación:
6
Prueba este:
Código PHP:
#include < amxmodx > #include < amxmisc > #include < fun > #include < fakemeta > #include < cstrike > #include < engine > #include < hamsandwich > #pragma semicolon 1 #define ACCESS_FLAG ADMIN_LEVEL_A //LA LETRA M new const g_szPluginName [ ] = "Weapons Menu" ; new const g_szPluginVersion [ ] = "1.0" ; new const g_szPluginAuthor [ ] = "Chema" ; new const g_szChatPrefix [ ] = "^4[^1GSP^4]^1" ; new const g_szWebsiteUrl [ ] = "www.clan99.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 }; new const g_szWeapons [ _ : eWeaponTypes ][ _ : eWeapon_Struct ] = { { CSW_AK47 , "weapon_ak47" , "AK47 - Futurics" , "models/gsp_armasn/v_ak47_1.mdl" , "models/gsp_armasn/p_ak47_1.mdl" , 90 }, // 0 { CSW_AK47 , "weapon_ak47" , "AK47 - Iron Man" , "models/gsp_armasn/v_ak47_2.mdl" , "models/gsp_armasn/p_ak47_2.mdl" , 90 }, // 1 { CSW_M4A1 , "weapon_m4a1" , "M4a1 - Monster" , "models/gsp_armasn/v_m4a1_v1.mdl" , "models/gsp_armasn/p_m4a1_v1.mdl" , 90 }, // 2 { CSW_M4A1 , "weapon_m4a1" , "M4a1 - Fire" , "models/gsp_armasn/v_m4a1_3.mdl" , "models/gsp_armasn/p_m4a1_v3.mdl" , 90 }, // 3 { CSW_AWP , "weapon_awp" , "Awp - Pink" , "models/gsp_armasn/v_awp_1.mdl" , "models/gsp_armasn/p_awp_1.mdl" , 30 }, // 4 { CSW_AWP , "weapon_awp" , "Awp - Pluton" , "models/gsp_armasn/v_awp_2.mdl" , "models/gsp_armasn/p_awp_2.mdl" , 30 } // 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 ( "say /skins" , "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 & ACCESS_FLAG ) { 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 & ACCESS_FLAG ) ShowMenu_Weapons ( iPlayerID ); else ShowMenu_Information ( iPlayerID ); return PLUGIN_HANDLED ; } /* Menus */ public ShowMenu_Weapons ( const iPlayerID ) { new iMenu = menu_create ( "Armas PREMIUM GSP." , "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***\rGuasdualito\d| \rStrike Pregamer #1\d***" , "HandlerMenu_Information" ); menu_additem ( iMenu , "\r* \wMenú de \yARMAS PREMIUM." ); menu_additem ( iMenu , "\r* \wPRECIO:\y 15.000Bs.S" ); menu_additem ( iMenu , "\r* \wGRUPO DE FACEBOOK:\d www.facebook.com/groups/GSP.VNZLA1/" ); menu_additem ( iMenu , "\r* DUEÑO: \yCesar Padrón" ); menu_additem ( iMenu , "\r* \wWHATSAPP DEL DUEÑO:\y+58-4264751483" ); menu_additem ( iMenu , "\r* \wEDITOR:\y Andre's <3. \r| \ywww.facebook.com/AndresMc2" ); 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 : client_print_color ( iPlayerID , 0 , "%s Próximamente vista previa!" , g_szChatPrefix ), ShowMenu_SelectedWeapon ( iPlayerID ); 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 ; }
"Cada golpe es una lección, y cada lección te hace mejor."
Mensajes: 20
Temas: 6
Registro en: Mar 2021
Reputación:
0
(27/04/2021, 11:17 AM) rojedafeik escribió: Prueba este:
Código PHP:
#include < amxmodx > #include < amxmisc > #include < fun > #include < fakemeta > #include < cstrike > #include < engine > #include < hamsandwich > #pragma semicolon 1 #define ACCESS_FLAG ADMIN_LEVEL_A //LA LETRA M new const g_szPluginName [ ] = "Weapons Menu" ; new const g_szPluginVersion [ ] = "1.0" ; new const g_szPluginAuthor [ ] = "Chema" ; new const g_szChatPrefix [ ] = "^4[^1GSP^4]^1" ; new const g_szWebsiteUrl [ ] = "www.clan99.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 }; new const g_szWeapons [ _ : eWeaponTypes ][ _ : eWeapon_Struct ] = { { CSW_AK47 , "weapon_ak47" , "AK47 - Futurics" , "models/gsp_armasn/v_ak47_1.mdl" , "models/gsp_armasn/p_ak47_1.mdl" , 90 }, // 0 { CSW_AK47 , "weapon_ak47" , "AK47 - Iron Man" , "models/gsp_armasn/v_ak47_2.mdl" , "models/gsp_armasn/p_ak47_2.mdl" , 90 }, // 1 { CSW_M4A1 , "weapon_m4a1" , "M4a1 - Monster" , "models/gsp_armasn/v_m4a1_v1.mdl" , "models/gsp_armasn/p_m4a1_v1.mdl" , 90 }, // 2 { CSW_M4A1 , "weapon_m4a1" , "M4a1 - Fire" , "models/gsp_armasn/v_m4a1_3.mdl" , "models/gsp_armasn/p_m4a1_v3.mdl" , 90 }, // 3 { CSW_AWP , "weapon_awp" , "Awp - Pink" , "models/gsp_armasn/v_awp_1.mdl" , "models/gsp_armasn/p_awp_1.mdl" , 30 }, // 4 { CSW_AWP , "weapon_awp" , "Awp - Pluton" , "models/gsp_armasn/v_awp_2.mdl" , "models/gsp_armasn/p_awp_2.mdl" , 30 } // 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 ( "say /skins" , "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 & ACCESS_FLAG ) { 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 & ACCESS_FLAG ) ShowMenu_Weapons ( iPlayerID ); else ShowMenu_Information ( iPlayerID ); return PLUGIN_HANDLED ; } /* Menus */ public ShowMenu_Weapons ( const iPlayerID ) { new iMenu = menu_create ( "Armas PREMIUM GSP." , "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***\rGuasdualito\d| \rStrike Pregamer #1\d***" , "HandlerMenu_Information" ); menu_additem ( iMenu , "\r* \wMenú de \yARMAS PREMIUM." ); menu_additem ( iMenu , "\r* \wPRECIO:\y 15.000Bs.S" ); menu_additem ( iMenu , "\r* \wGRUPO DE FACEBOOK:\d www.facebook.com/groups/GSP.VNZLA1/" ); menu_additem ( iMenu , "\r* DUEÑO: \yCesar Padrón" ); menu_additem ( iMenu , "\r* \wWHATSAPP DEL DUEÑO:\y+58-4264751483" ); menu_additem ( iMenu , "\r* \wEDITOR:\y Andre's <3. \r| \ywww.facebook.com/AndresMc2" ); 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 : client_print_color ( iPlayerID , 0 , "%s Próximamente vista previa!" , g_szChatPrefix ), ShowMenu_SelectedWeapon ( iPlayerID ); 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 ; }
Pero este plugin brinda la opcion de 3 skins por cada arma? Con el menu antes mencionado?
Mensajes: 300
Temas: 14
Registro en: Dec 2017
Reputación:
6
(27/04/2021, 11:24 AM) xlrenatolx escribió: Pero este plugin brinda la opcion de 3 skins por cada arma? Con el menu antes mencionado?
Puede brindar 3, 2, 1 o hasta más opciones. Solo tienes que agregarlas y listo!
"Cada golpe es una lección, y cada lección te hace mejor."
Mensajes: 20
Temas: 6
Registro en: Mar 2021
Reputación:
0
(27/04/2021, 11:27 AM) rojedafeik escribió: Puede brindar 3, 2, 1 o hasta más opciones. Solo tienes que agregarlas y listo!
Si lo que sucede que soy nuevo en esto :'v y no entiendo mucho de editar los plugin por eso pedía algo mas "especifico" tal como el post principal.
Mensajes: 300
Temas: 14
Registro en: Dec 2017
Reputación:
6
27/04/2021, 04:07 PM
(Última modificación: 27/04/2021, 04:07 PM por rojedafeik . Edited 1 time in total.)
Bueno soy muy malo explicando, pero trataré de guiarte:
En "g_szWeapons" es donde vas a añadir las armas, en este caso quieres que sea 3 de cada una (obviamente también pudes agregar más armas):
Código PHP:
new const g_szWeapons [ _ : eWeaponTypes ][ _ : eWeapon_Struct ] = { //AK'S //ID(1) //NOMBRE(2) //NOMBRE EN MENU(3) //RUDA DEL MODEL V_(4) //RUTA DEL MODEL P_(5) //BALAS(6) { CSW_AK47 , "weapon_ak47" , "AK47 - Futurics" , "models/gsp_armasn/v_ak47_1.mdl" , "models/gsp_armasn/p_ak47_1.mdl" , 90 }, { CSW_AK47 , "weapon_ak47" , "AK47 - Iron Man" , "models/gsp_armasn/v_ak47_2.mdl" , "models/gsp_armasn/p_ak47_2.mdl" , 90 }, { CSW_AK47 , "weapon_ak47" , "AK47 - Stark" , "models/gsp_armasn/v_ak47_2.mdl" , "models/gsp_armasn/p_ak47_2.mdl" , 90 }, //M4'S { CSW_M4A1 , "weapon_m4a1" , "M4a1 - Monster" , "models/gsp_armasn/v_m4a1_v1.mdl" , "models/gsp_armasn/p_m4a1_v1.mdl" , 90 }, { CSW_M4A1 , "weapon_m4a1" , "M4a1 - Fire" , "models/gsp_armasn/v_m4a1_3.mdl" , "models/gsp_armasn/p_m4a1_v3.mdl" , 90 }, { CSW_M4A1 , "weapon_m4a1" , "M4a1 - Cold" , "models/gsp_armasn/v_m4a1_3.mdl" , "models/gsp_armasn/p_m4a1_v3.mdl" , 90 }, //AWP'S { CSW_AWP , "weapon_awp" , "Awp - Pink" , "models/gsp_armasn/v_awp_1.mdl" , "models/gsp_armasn/p_awp_1.mdl" , 30 }, { CSW_AWP , "weapon_awp" , "Awp - Red" , "models/gsp_armasn/v_awp_1.mdl" , "models/gsp_armasn/p_awp_1.mdl" , 30 }, { CSW_AWP , "weapon_awp" , "Awp - Pluton" , "models/gsp_armasn/v_awp_2.mdl" , "models/gsp_armasn/p_awp_2.mdl" , 30 } //ETC.. };
-. La primera es el id del arma.
-. La segunda es el nombre del arma.
-. La tercera es el nombre con la que aparecerá el arma al abrir el menú.
-. La cuarta y la quinta es la ruta de los modelos o la carpeta donde se encuentran.
-. La sexta es la cantidad de balas que tendrá el cargador del arma seleccionada.
Para obtener el id y nombre del arma puedes sacarlo de aquí:
ID:
Código:
CSW_P228
CSW_SCOUT
CSW_HEGRENADE //GRANDA EXPLOSIVA
CSW_XM1014
CSW_C4
CSW_MAC10
CSW_AUG
CSW_SMOKEGRENADE //GRANDA HUMO
CSW_ELITE
CSW_FIVESEVEN
CSW_UMP45
CSW_SG550
CSW_GALIL
CSW_FAMAS
CSW_USP
CSW_GLOCK18
CSW_AWP
CSW_MP5NAVY
CSW_M249
CSW_M3
CSW_M4A1
CSW_TMP
CSW_G3SG1
CSW_FLASHBANG //GRANADA FLASH
CSW_DEAGLE
CSW_SG552
CSW_AK47
CSW_KNIFE
CSW_P90
CSW_VEST //CHALECO
CSW_VESTHELM //CHALECO Y CASCO
Nombre del arma:
Código:
weapon_p228
weapon_shield
weapon_scout
weapon_hegrenade
weapon_xm1014
weapon_c4
weapon_mac10
weapon_aug
weapon_smokegrenade
weapon_elite
weapon_fiveseven
weapon_ump45
weapon_sg550
weapon_galil
weapon_famas
weapon_usp
weapon_glock18
weapon_awp
weapon_mp5navy
weapon_m249
weapon_m3
weapon_m4a1
weapon_tmp
weapon_g3sg1
weapon_flashbang
weapon_deagle
weapon_sg552
weapon_ak47
weapon_knife
weapon_p90
Espero y te sirva.
"Cada golpe es una lección, y cada lección te hace mejor."
Mensajes: 20
Temas: 6
Registro en: Mar 2021
Reputación:
0
(27/04/2021, 04:07 PM) rojedafeik escribió: Bueno soy muy malo explicando, pero trataré de guiarte:
En "g_szWeapons" es donde vas a añadir las armas, en este caso quieres que sea 3 de cada una (obviamente también pudes agregar más armas):
Código PHP:
new const g_szWeapons [ _ : eWeaponTypes ][ _ : eWeapon_Struct ] = { //AK'S //ID(1) //NOMBRE(2) //NOMBRE EN MENU(3) //RUDA DEL MODEL V_(4) //RUTA DEL MODEL P_(5) //BALAS(6) { CSW_AK47 , "weapon_ak47" , "AK47 - Futurics" , "models/gsp_armasn/v_ak47_1.mdl" , "models/gsp_armasn/p_ak47_1.mdl" , 90 }, { CSW_AK47 , "weapon_ak47" , "AK47 - Iron Man" , "models/gsp_armasn/v_ak47_2.mdl" , "models/gsp_armasn/p_ak47_2.mdl" , 90 }, { CSW_AK47 , "weapon_ak47" , "AK47 - Stark" , "models/gsp_armasn/v_ak47_2.mdl" , "models/gsp_armasn/p_ak47_2.mdl" , 90 }, //M4'S { CSW_M4A1 , "weapon_m4a1" , "M4a1 - Monster" , "models/gsp_armasn/v_m4a1_v1.mdl" , "models/gsp_armasn/p_m4a1_v1.mdl" , 90 }, { CSW_M4A1 , "weapon_m4a1" , "M4a1 - Fire" , "models/gsp_armasn/v_m4a1_3.mdl" , "models/gsp_armasn/p_m4a1_v3.mdl" , 90 }, { CSW_M4A1 , "weapon_m4a1" , "M4a1 - Cold" , "models/gsp_armasn/v_m4a1_3.mdl" , "models/gsp_armasn/p_m4a1_v3.mdl" , 90 }, //AWP'S { CSW_AWP , "weapon_awp" , "Awp - Pink" , "models/gsp_armasn/v_awp_1.mdl" , "models/gsp_armasn/p_awp_1.mdl" , 30 }, { CSW_AWP , "weapon_awp" , "Awp - Red" , "models/gsp_armasn/v_awp_1.mdl" , "models/gsp_armasn/p_awp_1.mdl" , 30 }, { CSW_AWP , "weapon_awp" , "Awp - Pluton" , "models/gsp_armasn/v_awp_2.mdl" , "models/gsp_armasn/p_awp_2.mdl" , 30 } //ETC.. };
-. La primera es el id del arma.
-. La segunda es el nombre del arma.
-. La tercera es el nombre con la que aparecerá el arma al abrir el menú.
-. La cuarta y la quinta es la ruta de los modelos o la carpeta donde se encuentran.
-. La sexta es la cantidad de balas que tendrá el cargador del arma seleccionada.
Para obtener el id y nombre del arma puedes sacarlo de aquí:
ID:
Código:
CSW_P228
CSW_SCOUT
CSW_HEGRENADE //GRANDA EXPLOSIVA
CSW_XM1014
CSW_C4
CSW_MAC10
CSW_AUG
CSW_SMOKEGRENADE //GRANDA HUMO
CSW_ELITE
CSW_FIVESEVEN
CSW_UMP45
CSW_SG550
CSW_GALIL
CSW_FAMAS
CSW_USP
CSW_GLOCK18
CSW_AWP
CSW_MP5NAVY
CSW_M249
CSW_M3
CSW_M4A1
CSW_TMP
CSW_G3SG1
CSW_FLASHBANG //GRANADA FLASH
CSW_DEAGLE
CSW_SG552
CSW_AK47
CSW_KNIFE
CSW_P90
CSW_VEST //CHALECO
CSW_VESTHELM //CHALECO Y CASCO
Nombre del arma:
Código:
weapon_p228
weapon_shield
weapon_scout
weapon_hegrenade
weapon_xm1014
weapon_c4
weapon_mac10
weapon_aug
weapon_smokegrenade
weapon_elite
weapon_fiveseven
weapon_ump45
weapon_sg550
weapon_galil
weapon_famas
weapon_usp
weapon_glock18
weapon_awp
weapon_mp5navy
weapon_m249
weapon_m3
weapon_m4a1
weapon_tmp
weapon_g3sg1
weapon_flashbang
weapon_deagle
weapon_sg552
weapon_ak47
weapon_knife
weapon_p90
Espero y te sirva.
Me tira error al compilar:
Error: Undefined symbol "client_print_color" on line 255
Error: Undefined symbol "client_print_color" on line 256
Error: Undefined symbol "client_print_color" on line 274
3 Errors.
Could not locate output file C:\Users\USER\Desktop\armasprueba.amx (compile failed).
Cita: case 1: client_print_color( iPlayerID, 0, "%s Próximamente vista previa!", g_szChatPrefix ), ShowMenu_SelectedWeapon( iPlayerID );
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 );
client_print_color( iPlayerID, 0, "%s Has elegido: ^4%s", g_szChatPrefix, g_szWeapons[ g_iWeaponSelected[ iPlayerID ] ][ WEAPON_NAME ] );
Mensajes: 144
Temas: 4
Registro en: Mar 2018
Reputación:
8
(28/04/2021, 05:33 PM) xlrenatolx escribió: Me tira error al compilar:
Error: Undefined symbol "client_print_color" on line 255
Error: Undefined symbol "client_print_color" on line 256
Error: Undefined symbol "client_print_color" on line 274
3 Errors.
Could not locate output file C:\Users\USER\Desktop\armasprueba.amx (compile failed).
Actualiza tu amx a 1.9
Mensajes: 20
Temas: 6
Registro en: Mar 2021
Reputación:
0
Acabo de compilar todo y funciona, el problema es que al escoger el "skin" me da el arma xD, osea se compra sin siquiera descontarme dinero además de que si escojo algún skins de ak,awp,m4a1s me quita las granadas y pistola, , llevo buscando el plugin que mencione al inicio mucho tiempo pero no tengo suerte. Solo que me brinde la opción de cambiar de 3 skins por arma.
Gracias igualmente.
Mensajes: 24
Temas: 6
Registro en: Aug 2021
Reputación:
0
(27/04/2021, 04:07 PM) rojedafeik escribió: Bueno soy muy malo explicando, pero trataré de guiarte:
En "g_szWeapons" es donde vas a añadir las armas, en este caso quieres que sea 3 de cada una (obviamente también pudes agregar más armas):
Código PHP:
new const g_szWeapons [ _ : eWeaponTypes ][ _ : eWeapon_Struct ] = { //AK'S //ID(1) //NOMBRE(2) //NOMBRE EN MENU(3) //RUDA DEL MODEL V_(4) //RUTA DEL MODEL P_(5) //BALAS(6) { CSW_AK47 , "weapon_ak47" , "AK47 - Futurics" , "models/gsp_armasn/v_ak47_1.mdl" , "models/gsp_armasn/p_ak47_1.mdl" , 90 }, { CSW_AK47 , "weapon_ak47" , "AK47 - Iron Man" , "models/gsp_armasn/v_ak47_2.mdl" , "models/gsp_armasn/p_ak47_2.mdl" , 90 }, { CSW_AK47 , "weapon_ak47" , "AK47 - Stark" , "models/gsp_armasn/v_ak47_2.mdl" , "models/gsp_armasn/p_ak47_2.mdl" , 90 }, //M4'S { CSW_M4A1 , "weapon_m4a1" , "M4a1 - Monster" , "models/gsp_armasn/v_m4a1_v1.mdl" , "models/gsp_armasn/p_m4a1_v1.mdl" , 90 }, { CSW_M4A1 , "weapon_m4a1" , "M4a1 - Fire" , "models/gsp_armasn/v_m4a1_3.mdl" , "models/gsp_armasn/p_m4a1_v3.mdl" , 90 }, { CSW_M4A1 , "weapon_m4a1" , "M4a1 - Cold" , "models/gsp_armasn/v_m4a1_3.mdl" , "models/gsp_armasn/p_m4a1_v3.mdl" , 90 }, //AWP'S { CSW_AWP , "weapon_awp" , "Awp - Pink" , "models/gsp_armasn/v_awp_1.mdl" , "models/gsp_armasn/p_awp_1.mdl" , 30 }, { CSW_AWP , "weapon_awp" , "Awp - Red" , "models/gsp_armasn/v_awp_1.mdl" , "models/gsp_armasn/p_awp_1.mdl" , 30 }, { CSW_AWP , "weapon_awp" , "Awp - Pluton" , "models/gsp_armasn/v_awp_2.mdl" , "models/gsp_armasn/p_awp_2.mdl" , 30 } //ETC.. };
-. La primera es el id del arma.
-. La segunda es el nombre del arma.
-. La tercera es el nombre con la que aparecerá el arma al abrir el menú.
-. La cuarta y la quinta es la ruta de los modelos o la carpeta donde se encuentran.
-. La sexta es la cantidad de balas que tendrá el cargador del arma seleccionada.
Para obtener el id y nombre del arma puedes sacarlo de aquí:
ID:
Código:
CSW_P228
CSW_SCOUT
CSW_HEGRENADE //GRANDA EXPLOSIVA
CSW_XM1014
CSW_C4
CSW_MAC10
CSW_AUG
CSW_SMOKEGRENADE //GRANDA HUMO
CSW_ELITE
CSW_FIVESEVEN
CSW_UMP45
CSW_SG550
CSW_GALIL
CSW_FAMAS
CSW_USP
CSW_GLOCK18
CSW_AWP
CSW_MP5NAVY
CSW_M249
CSW_M3
CSW_M4A1
CSW_TMP
CSW_G3SG1
CSW_FLASHBANG //GRANADA FLASH
CSW_DEAGLE
CSW_SG552
CSW_AK47
CSW_KNIFE
CSW_P90
CSW_VEST //CHALECO
CSW_VESTHELM //CHALECO Y CASCO
Nombre del arma:
Código:
weapon_p228
weapon_shield
weapon_scout
weapon_hegrenade
weapon_xm1014
weapon_c4
weapon_mac10
weapon_aug
weapon_smokegrenade
weapon_elite
weapon_fiveseven
weapon_ump45
weapon_sg550
weapon_galil
weapon_famas
weapon_usp
weapon_glock18
weapon_awp
weapon_mp5navy
weapon_m249
weapon_m3
weapon_m4a1
weapon_tmp
weapon_g3sg1
weapon_flashbang
weapon_deagle
weapon_sg552
weapon_ak47
weapon_knife
weapon_p90
Espero y te sirva.
hola rojeda, yo lo use y funciona bien pero como hago para cuando compro una deagle y la aka no se desaparezca alguna