AYUDA POR FAVOR CON UN PLUGIN
#1
Estrella 
HOLA UN SALUDO A TODOS, QUERIA SABER SI ME PODRIAN AYUDAR CON UN PLUGIN DE MENÚ DE ARMAS COMO EL QUE SE MUESTRA AQUI, QUE TENGA OPCION DE AUTOEQUIPAR O NO EL ARMA SELECCIONADA, Y QUE AL DROPEAR EL ARMA SELECCIONADA EJEMPLO (AK, M4, AW) DESAPAREZCA AYUDA POR FAVOR Y GRACIAS DE ANTEMANO

AQUI ADJUNTO ALGUNAS IMAGENES Mario


Archivos adjuntos Miniatura(s)
           
Responder
#2
Bro como se llama ese plugin? Lo nesecito!!!!
Responder
#3
(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í . . !!  Roflmao Roflmao
Responder
#4
yo creo que este es haci (creo, no lo he probado)
https://forums.alliedmods.net/showthread.php?t=167709
Responder
#5
(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
Responder
#6
Y cuanto pagas por el plugin
Responder
#7
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_ENT32 ],
    WEAPON_NAME40 ],
    WEAPON_VIEWMODEL50 ],
    WEAPON_PLAYERMODEL50 ],
    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_iWeaponPreview33 ];
new 
g_iWeaponSelected33 ];

public 
plugin_precache( ) {

    for( new 0sizeof g_szWeaponsi++) {

        precache_modelg_szWeapons][ WEAPON_VIEWMODEL ] );
        precache_modelg_szWeapons][ WEAPON_PLAYERMODEL ] );
    }
}

public 
plugin_init( ) {

    /* Register Plugin & Cvars */
    register_pluging_szPluginNameg_szPluginVersiong_szPluginAuthor );

    /* Events & LogEvents */
    register_event"CurWeapon""Event_CurWeapon""be","1=1" );

    /* Forwards */
    register_forwardFM_SetModel"Forward_SetModel" );  

    
/* Hamsandwichs */
    RegisterHamHam_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);

    static iUserFlags;
    iUserFlags get_user_flagsiPlayerID );

    if( g_iWeaponSelectediPlayerID ] == WEAPON_NONE || iWeaponID != g_szWeaponsg_iWeaponSelectediPlayerID ] ][ WEAPON_CSW ] )
        return PLUGIN_CONTINUE;

    if( iUserFlags ADMIN_RCON ) {

        entity_set_stringiPlayerIDEV_SZ_viewmodelg_szWeaponsg_iWeaponSelectediPlayerID ] ][ WEAPON_VIEWMODEL ] );
        entity_set_stringiPlayerIDEV_SZ_weaponmodelg_szWeaponsg_iWeaponSelectediPlayerID ] ][ WEAPON_PLAYERMODEL ] );
    }

    return PLUGIN_CONTINUE;
}

/* Forwards */
public Forward_SetModel( const iEntity, const szModel[ ] ) {

    if( equalszModel,"models/w_awp.mdl" ) ) {

        set_peviEntitypev_nextthinkget_gametime( ) + 0.01 );
        return;
    }
}

/* Hamsandwichs */
public OnPlayer_SpawnPost( const iPlayerID ) {

    if( !is_user_aliveiPlayerID ) )
        return PLUGIN_CONTINUE;

    if( g_iWeaponSelectediPlayerID ] != WEAPON_NONE )
        OnPlayer_SelectedWeaponsiPlayerID );

    return  PLUGIN_HANDLED;
}

/* Client-related Stuff */
public client_putinserveriPlayerID ) {

    g_iWeaponSelectediPlayerID ] = WEAPON_NONE;
}

public 
ClientCommand_BlockDrop( const iPlayerID ) {

    new iWeaponID get_user_weaponiPlayerID );

    if( iWeaponID == CSW_AWP && ( g_iWeaponSelectediPlayerID ] == WEAPON_PINK || g_iWeaponSelectediPlayerID ] == WEAPON_PLUTON ) )
        return PLUGIN_HANDLED;

    return PLUGIN_CONTINUE;
}

public 
ClientCommand_CheckMenu( const iPlayerID ) {

    static iUserFlags;
    iUserFlags get_user_flagsiPlayerID );

    if( iUserFlags ADMIN_RCON )
        ShowMenu_WeaponsiPlayerID );
    else 
        ShowMenu_InformationiPlayerID );

    return PLUGIN_HANDLED;
}

/* Menus */
public ShowMenu_Weapons( const iPlayerID ) {

    new iMenu menu_create"Armas menu.""HandlerMenu_Weapons" );

    new szBuffer52 ];
    for( new 0sizeof g_szWeaponsi++ ) {

        formatszBuffer51"%s%s"g_szWeapons][ WEAPON_NAME ], g_iWeaponSelectediPlayerID ] == " \r[EQUIPADA]" "" );
        menu_additemiMenuszBuffer, .callback menu_makecallback"CallbackWeaponsMenu" ) );
    }

    menu_displayiPlayerIDiMenu );

    return PLUGIN_HANDLED;
}

public 
CallbackWeaponsMenu( const iPlayerID, const iMenu, const iItem ) {

    if( g_iWeaponSelectediPlayerID ] == 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_additemiMenu"\r* \wMenú de \yARMAS PREMIUM." );

    menu_displayiPlayerIDiMenu );

    return PLUGIN_HANDLED;
}

public 
HandlerMenu_Information( const iPlayerID, const iMenu, const iItem ) {

    if( iItem == MENU_EXIT ) {

        menu_destroyiMenu );
        return PLUGIN_HANDLED;
    }

    return PLUGIN_HANDLED;
}

public 
HandlerMenu_Weapons( const iPlayerID, const iMenu, const iItem ) {

    if( iItem == MENU_EXIT ) {

        menu_destroyiMenu );
        return PLUGIN_HANDLED;
    }

    g_iWeaponPreviewiPlayerID ] = iItem;
    ShowMenu_SelectedWeaponiPlayerID );

    return PLUGIN_HANDLED;
}

public 
ShowMenu_SelectedWeapon( const iPlayerID ) {

    static szBuffer1024 ], iLeniKeys;

    iLen 0;
    
    iLen 
+= formatexszBufferiLen ], charsmaxszBuffer ) - iLen"\d%s^n\yArma seleccionada^n^n"g_szWebsiteUrl );

    iLen += formatexszBufferiLen ], charsmaxszBuffer ) - iLen"\r* \d- \r%s^n^n"g_szWeaponsg_iWeaponPreviewiPlayerID ] ][ WEAPON_NAME ] );

    iLen += formatexszBufferiLen ], charsmaxszBuffer ) - iLen"\r1. \wElegir^n" );
    iLen += formatexszBufferiLen ], charsmaxszBuffer ) - iLen"\r2. \wVista previa^n" );
    iLen += formatexszBufferiLen ], charsmaxszBuffer ) - iLen"\r3. \wAuto equipar^n^n" );

    iLen += formatexszBufferiLen ], charsmaxszBuffer ) - iLen"\r4. \wRegresar^n" );
    iLen += formatexszBufferiLen ], charsmaxszBuffer ) - iLen"\r0. \wCerrar" );
    
    iKeys 
= (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<9);

    show_menuiPlayerIDiKeysszBuffer, -1"Weapons Menu" );

    return PLUGIN_HANDLED;
}

public 
HandlerWeaponsMenu( const iPlayerID, const iKey ) {

    switch( iKey ) {

        case 0g_iWeaponSelectediPlayerID ] = g_iWeaponPreviewiPlayerID ], OnPlayer_SelectedWeaponsiPlayerID );
        case 1show_motd(iPlayerIDg_szWeaponsg_iWeaponPreviewiPlayerID ] ][ URL ]);
        case 2client_print_coloriPlayerID0"%s Este arma será automaticamente equipada en cada respawn!"g_szChatPrefix ), g_iWeaponSelectediPlayerID ] = g_iWeaponPreviewiPlayerID ], OnPlayer_SelectedWeaponsiPlayerID );
        case 3g_iWeaponSelectediPlayerID ] = WEAPON_NONEClientCommand_CheckMenuiPlayerID );
        case 9g_iWeaponSelectediPlayerID ] = WEAPON_NONE;
    }
    
    
if( iKey != )
        client_cmdiPlayerID"spk ^"%s^""g_szItemMenuSound );

    return PLUGIN_HANDLED;
}

/* Private functions & Stocks */
OnPlayer_SelectedWeapons( const iPlayerID ) {

    strip_user_weaponsiPlayerID );
    give_itemiPlayerID"weapon_knife" );
    give_item iPlayerIDg_szWeaponsg_iWeaponSelectediPlayerID ] ][ WEAPON_ENT ] );
    cs_set_user_bpammoiPlayerIDg_szWeaponsg_iWeaponSelectediPlayerID ] ][ WEAPON_CSW ], g_szWeaponsg_iWeaponSelectediPlayerID ] ][ WEAPON_BULLETS ] );
    client_print_coloriPlayerID0"%s Has elegido: ^4%s"g_szChatPrefixg_szWeaponsg_iWeaponSelectediPlayerID ] ][ WEAPON_NAME ] );

    return PLUGIN_HANDLED;

Cita:Cruzadas incompletas en penínsulas desiertas. Feel like a sir
Responder
#8
(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_ENT32 ],
    WEAPON_NAME40 ],
    WEAPON_VIEWMODEL50 ],
    WEAPON_PLAYERMODEL50 ],
    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_iWeaponPreview33 ];
new 
g_iWeaponSelected33 ];

public 
plugin_precache( ) {

    for( new 0sizeof g_szWeaponsi++) {

        precache_modelg_szWeapons][ WEAPON_VIEWMODEL ] );
        precache_modelg_szWeapons][ WEAPON_PLAYERMODEL ] );
    }
}

public 
plugin_init( ) {

    /* Register Plugin & Cvars */
    register_pluging_szPluginNameg_szPluginVersiong_szPluginAuthor );

    /* Events & LogEvents */
    register_event"CurWeapon""Event_CurWeapon""be","1=1" );

    /* Forwards */
    register_forwardFM_SetModel"Forward_SetModel" );  

    
/* Hamsandwichs */
    RegisterHamHam_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);

    static iUserFlags;
    iUserFlags get_user_flagsiPlayerID );

    if( g_iWeaponSelectediPlayerID ] == WEAPON_NONE || iWeaponID != g_szWeaponsg_iWeaponSelectediPlayerID ] ][ WEAPON_CSW ] )
        return PLUGIN_CONTINUE;

    if( iUserFlags ADMIN_RCON ) {

        entity_set_stringiPlayerIDEV_SZ_viewmodelg_szWeaponsg_iWeaponSelectediPlayerID ] ][ WEAPON_VIEWMODEL ] );
        entity_set_stringiPlayerIDEV_SZ_weaponmodelg_szWeaponsg_iWeaponSelectediPlayerID ] ][ WEAPON_PLAYERMODEL ] );
    }

    return PLUGIN_CONTINUE;
}

/* Forwards */
public Forward_SetModel( const iEntity, const szModel[ ] ) {

    if( equalszModel,"models/w_awp.mdl" ) ) {

        set_peviEntitypev_nextthinkget_gametime( ) + 0.01 );
        return;
    }
}

/* Hamsandwichs */
public OnPlayer_SpawnPost( const iPlayerID ) {

    if( !is_user_aliveiPlayerID ) )
        return PLUGIN_CONTINUE;

    if( g_iWeaponSelectediPlayerID ] != WEAPON_NONE )
        OnPlayer_SelectedWeaponsiPlayerID );

    return  PLUGIN_HANDLED;
}

/* Client-related Stuff */
public client_putinserveriPlayerID ) {

    g_iWeaponSelectediPlayerID ] = WEAPON_NONE;
}

public 
ClientCommand_BlockDrop( const iPlayerID ) {

    new iWeaponID get_user_weaponiPlayerID );

    if( iWeaponID == CSW_AWP && ( g_iWeaponSelectediPlayerID ] == WEAPON_PINK || g_iWeaponSelectediPlayerID ] == WEAPON_PLUTON ) )
        return PLUGIN_HANDLED;

    return PLUGIN_CONTINUE;
}

public 
ClientCommand_CheckMenu( const iPlayerID ) {

    static iUserFlags;
    iUserFlags get_user_flagsiPlayerID );

    if( iUserFlags ADMIN_RCON )
        ShowMenu_WeaponsiPlayerID );
    else 
        ShowMenu_InformationiPlayerID );

    return PLUGIN_HANDLED;
}

/* Menus */
public ShowMenu_Weapons( const iPlayerID ) {

    new iMenu menu_create"Armas menu.""HandlerMenu_Weapons" );

    new szBuffer52 ];
    for( new 0sizeof g_szWeaponsi++ ) {

        formatszBuffer51"%s%s"g_szWeapons][ WEAPON_NAME ], g_iWeaponSelectediPlayerID ] == " \r[EQUIPADA]" "" );
        menu_additemiMenuszBuffer, .callback menu_makecallback"CallbackWeaponsMenu" ) );
    }

    menu_displayiPlayerIDiMenu );

    return PLUGIN_HANDLED;
}

public 
CallbackWeaponsMenu( const iPlayerID, const iMenu, const iItem ) {

    if( g_iWeaponSelectediPlayerID ] == 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_additemiMenu"\r* \wMenú de \yARMAS PREMIUM." );

    menu_displayiPlayerIDiMenu );

    return PLUGIN_HANDLED;
}

public 
HandlerMenu_Information( const iPlayerID, const iMenu, const iItem ) {

    if( iItem == MENU_EXIT ) {

        menu_destroyiMenu );
        return PLUGIN_HANDLED;
    }

    return PLUGIN_HANDLED;
}

public 
HandlerMenu_Weapons( const iPlayerID, const iMenu, const iItem ) {

    if( iItem == MENU_EXIT ) {

        menu_destroyiMenu );
        return PLUGIN_HANDLED;
    }

    g_iWeaponPreviewiPlayerID ] = iItem;
    ShowMenu_SelectedWeaponiPlayerID );

    return PLUGIN_HANDLED;
}

public 
ShowMenu_SelectedWeapon( const iPlayerID ) {

    static szBuffer1024 ], iLeniKeys;

    iLen 0;
    
    iLen 
+= formatexszBufferiLen ], charsmaxszBuffer ) - iLen"\d%s^n\yArma seleccionada^n^n"g_szWebsiteUrl );

    iLen += formatexszBufferiLen ], charsmaxszBuffer ) - iLen"\r* \d- \r%s^n^n"g_szWeaponsg_iWeaponPreviewiPlayerID ] ][ WEAPON_NAME ] );

    iLen += formatexszBufferiLen ], charsmaxszBuffer ) - iLen"\r1. \wElegir^n" );
    iLen += formatexszBufferiLen ], charsmaxszBuffer ) - iLen"\r2. \wVista previa^n" );
    iLen += formatexszBufferiLen ], charsmaxszBuffer ) - iLen"\r3. \wAuto equipar^n^n" );

    iLen += formatexszBufferiLen ], charsmaxszBuffer ) - iLen"\r4. \wRegresar^n" );
    iLen += formatexszBufferiLen ], charsmaxszBuffer ) - iLen"\r0. \wCerrar" );
    
    iKeys 
= (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<9);

    show_menuiPlayerIDiKeysszBuffer, -1"Weapons Menu" );

    return PLUGIN_HANDLED;
}

public 
HandlerWeaponsMenu( const iPlayerID, const iKey ) {

    switch( iKey ) {

        case 0g_iWeaponSelectediPlayerID ] = g_iWeaponPreviewiPlayerID ], OnPlayer_SelectedWeaponsiPlayerID );
        case 1show_motd(iPlayerIDg_szWeaponsg_iWeaponPreviewiPlayerID ] ][ URL ]);
        case 2client_print_coloriPlayerID0"%s Este arma será automaticamente equipada en cada respawn!"g_szChatPrefix ), g_iWeaponSelectediPlayerID ] = g_iWeaponPreviewiPlayerID ], OnPlayer_SelectedWeaponsiPlayerID );
        case 3g_iWeaponSelectediPlayerID ] = WEAPON_NONEClientCommand_CheckMenuiPlayerID );
        case 9g_iWeaponSelectediPlayerID ] = WEAPON_NONE;
    }
    
    
if( iKey != )
        client_cmdiPlayerID"spk ^"%s^""g_szItemMenuSound );

    return PLUGIN_HANDLED;
}

/* Private functions & Stocks */
OnPlayer_SelectedWeapons( const iPlayerID ) {

    strip_user_weaponsiPlayerID );
    give_itemiPlayerID"weapon_knife" );
    give_item iPlayerIDg_szWeaponsg_iWeaponSelectediPlayerID ] ][ WEAPON_ENT ] );
    cs_set_user_bpammoiPlayerIDg_szWeaponsg_iWeaponSelectediPlayerID ] ][ WEAPON_CSW ], g_szWeaponsg_iWeaponSelectediPlayerID ] ][ WEAPON_BULLETS ] );
    client_print_coloriPlayerID0"%s Has elegido: ^4%s"g_szChatPrefixg_szWeaponsg_iWeaponSelectediPlayerID ] ][ WEAPON_NAME ] );

    return PLUGIN_HANDLED;


Muchas gracias TheKing, ahora lo pruebo y te digo  Mario
Responder
#9
(13/05/2021, 03:11 AM)LeanPPP escribió: Y cuanto pagas por el plugin
x2


https://amxmodx-es.com/showthread.php?tid=23905
Responder
#10
(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  Mario

(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_ENT32 ],
    WEAPON_NAME40 ],
    WEAPON_VIEWMODEL50 ],
    WEAPON_PLAYERMODEL50 ],
    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_iWeaponPreview33 ];
new 
g_iWeaponSelected33 ];

public 
plugin_precache( ) {

    for( new 0sizeof g_szWeaponsi++) {

        precache_modelg_szWeapons][ WEAPON_VIEWMODEL ] );
        precache_modelg_szWeapons][ WEAPON_PLAYERMODEL ] );
    }
}

public 
plugin_init( ) {

    /* Register Plugin & Cvars */
    register_pluging_szPluginNameg_szPluginVersiong_szPluginAuthor );

    /* Events & LogEvents */
    register_event"CurWeapon""Event_CurWeapon""be","1=1" );

    /* Forwards */
    register_forwardFM_SetModel"Forward_SetModel" );  

    
/* Hamsandwichs */
    RegisterHamHam_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);

    static iUserFlags;
    iUserFlags get_user_flagsiPlayerID );

    if( g_iWeaponSelectediPlayerID ] == WEAPON_NONE || iWeaponID != g_szWeaponsg_iWeaponSelectediPlayerID ] ][ WEAPON_CSW ] )
        return PLUGIN_CONTINUE;

    if( iUserFlags ADMIN_RCON ) {

        entity_set_stringiPlayerIDEV_SZ_viewmodelg_szWeaponsg_iWeaponSelectediPlayerID ] ][ WEAPON_VIEWMODEL ] );
        entity_set_stringiPlayerIDEV_SZ_weaponmodelg_szWeaponsg_iWeaponSelectediPlayerID ] ][ WEAPON_PLAYERMODEL ] );
    }

    return PLUGIN_CONTINUE;
}

/* Forwards */
public Forward_SetModel( const iEntity, const szModel[ ] ) {

    if( equalszModel,"models/w_awp.mdl" ) ) {

        set_peviEntitypev_nextthinkget_gametime( ) + 0.01 );
        return;
    }
}

/* Hamsandwichs */
public OnPlayer_SpawnPost( const iPlayerID ) {

    if( !is_user_aliveiPlayerID ) )
        return PLUGIN_CONTINUE;

    if( g_iWeaponSelectediPlayerID ] != WEAPON_NONE )
        OnPlayer_SelectedWeaponsiPlayerID );

    return  PLUGIN_HANDLED;
}

/* Client-related Stuff */
public client_putinserveriPlayerID ) {

    g_iWeaponSelectediPlayerID ] = WEAPON_NONE;
}

public 
ClientCommand_BlockDrop( const iPlayerID ) {

    new iWeaponID get_user_weaponiPlayerID );

    if( iWeaponID == CSW_AWP && ( g_iWeaponSelectediPlayerID ] == WEAPON_PINK || g_iWeaponSelectediPlayerID ] == WEAPON_PLUTON ) )
        return PLUGIN_HANDLED;

    return PLUGIN_CONTINUE;
}

public 
ClientCommand_CheckMenu( const iPlayerID ) {

    static iUserFlags;
    iUserFlags get_user_flagsiPlayerID );

    if( iUserFlags ADMIN_RCON )
        ShowMenu_WeaponsiPlayerID );
    else 
        ShowMenu_InformationiPlayerID );

    return PLUGIN_HANDLED;
}

/* Menus */
public ShowMenu_Weapons( const iPlayerID ) {

    new iMenu menu_create"Armas menu.""HandlerMenu_Weapons" );

    new szBuffer52 ];
    for( new 0sizeof g_szWeaponsi++ ) {

        formatszBuffer51"%s%s"g_szWeapons][ WEAPON_NAME ], g_iWeaponSelectediPlayerID ] == " \r[EQUIPADA]" "" );
        menu_additemiMenuszBuffer, .callback menu_makecallback"CallbackWeaponsMenu" ) );
    }

    menu_displayiPlayerIDiMenu );

    return PLUGIN_HANDLED;
}

public 
CallbackWeaponsMenu( const iPlayerID, const iMenu, const iItem ) {

    if( g_iWeaponSelectediPlayerID ] == 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_additemiMenu"\r* \wMenú de \yARMAS PREMIUM." );

    menu_displayiPlayerIDiMenu );

    return PLUGIN_HANDLED;
}

public 
HandlerMenu_Information( const iPlayerID, const iMenu, const iItem ) {

    if( iItem == MENU_EXIT ) {

        menu_destroyiMenu );
        return PLUGIN_HANDLED;
    }

    return PLUGIN_HANDLED;
}

public 
HandlerMenu_Weapons( const iPlayerID, const iMenu, const iItem ) {

    if( iItem == MENU_EXIT ) {

        menu_destroyiMenu );
        return PLUGIN_HANDLED;
    }

    g_iWeaponPreviewiPlayerID ] = iItem;
    ShowMenu_SelectedWeaponiPlayerID );

    return PLUGIN_HANDLED;
}

public 
ShowMenu_SelectedWeapon( const iPlayerID ) {

    static szBuffer1024 ], iLeniKeys;

    iLen 0;
    
    iLen 
+= formatexszBufferiLen ], charsmaxszBuffer ) - iLen"\d%s^n\yArma seleccionada^n^n"g_szWebsiteUrl );

    iLen += formatexszBufferiLen ], charsmaxszBuffer ) - iLen"\r* \d- \r%s^n^n"g_szWeaponsg_iWeaponPreviewiPlayerID ] ][ WEAPON_NAME ] );

    iLen += formatexszBufferiLen ], charsmaxszBuffer ) - iLen"\r1. \wElegir^n" );
    iLen += formatexszBufferiLen ], charsmaxszBuffer ) - iLen"\r2. \wVista previa^n" );
    iLen += formatexszBufferiLen ], charsmaxszBuffer ) - iLen"\r3. \wAuto equipar^n^n" );

    iLen += formatexszBufferiLen ], charsmaxszBuffer ) - iLen"\r4. \wRegresar^n" );
    iLen += formatexszBufferiLen ], charsmaxszBuffer ) - iLen"\r0. \wCerrar" );
    
    iKeys 
= (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<9);

    show_menuiPlayerIDiKeysszBuffer, -1"Weapons Menu" );

    return PLUGIN_HANDLED;
}

public 
HandlerWeaponsMenu( const iPlayerID, const iKey ) {

    switch( iKey ) {

        case 0g_iWeaponSelectediPlayerID ] = g_iWeaponPreviewiPlayerID ], OnPlayer_SelectedWeaponsiPlayerID );
        case 1show_motd(iPlayerIDg_szWeaponsg_iWeaponPreviewiPlayerID ] ][ URL ]);
        case 2client_print_coloriPlayerID0"%s Este arma será automaticamente equipada en cada respawn!"g_szChatPrefix ), g_iWeaponSelectediPlayerID ] = g_iWeaponPreviewiPlayerID ], OnPlayer_SelectedWeaponsiPlayerID );
        case 3g_iWeaponSelectediPlayerID ] = WEAPON_NONEClientCommand_CheckMenuiPlayerID );
        case 9g_iWeaponSelectediPlayerID ] = WEAPON_NONE;
    }
    
    
if( iKey != )
        client_cmdiPlayerID"spk ^"%s^""g_szItemMenuSound );

    return PLUGIN_HANDLED;
}

/* Private functions & Stocks */
OnPlayer_SelectedWeapons( const iPlayerID ) {

    strip_user_weaponsiPlayerID );
    give_itemiPlayerID"weapon_knife" );
    give_item iPlayerIDg_szWeaponsg_iWeaponSelectediPlayerID ] ][ WEAPON_ENT ] );
    cs_set_user_bpammoiPlayerIDg_szWeaponsg_iWeaponSelectediPlayerID ] ][ WEAPON_CSW ], g_szWeaponsg_iWeaponSelectediPlayerID ] ][ WEAPON_BULLETS ] );
    client_print_coloriPlayerID0"%s Has elegido: ^4%s"g_szChatPrefixg_szWeaponsg_iWeaponSelectediPlayerID ] ][ 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?
Cutecry
Responder
#11
(13/05/2021, 03:11 AM)LeanPPP escribió: Y cuanto pagas por el plugin

Cuanto pides por ese plugin?
Responder
#12
(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.
Responder
#13
(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?
Responder
#14
SI ALGUIEN TIENE ESTE PLUGIN, Y PUEDE AYUDAR CON ÉL O SI ES DE PAGARLO POR FAVOR..
Responder
#15
(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
Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)