menu de cuchillos
#1
buenas que tal alguien me podria editar el siguiente plugin para que tenga 3 opciones mas de cuchillos de los que ya tiene?
Código PHP:
#include <amxmodx>
#include <engine>
#include <hamsandwich>

#define PLUGIN  "menu cuchillos"
#define VERSION "1.5"
#define AUTHOR  "[N]drs"

enum _:DATA
{
    NAME[25],
    V_MDL[126]
}

new const 
KNIFES[][DATA] = {
    {"Cuchillo Normal""models/v_knife.mdl"},
    {"Valorant""models/phantom/v_valorant.mdl"},
    {"Karambit""models/phantom/v_karambitphantom.mdl"},
    {"Bayoneta m9""models/phantom/v_m9phantom.mdl"},
    {"Butterfly""models/phantom/v_mariposaphantom.mdl"}
  
}

new 
g_iModel[33], g_iUse[33][sizeof(KNIFES) + 1]

public 
plugin_init()
{
    register_plugin(PLUGINVERSIONAUTHOR)

    RegisterHam(Ham_Item_Deploy"weapon_knife""HamItemDeploy"true)
    register_clcmd("say /faka""menu")
}

public 
plugin_precache()
{
    for(new isizeof(KNIFES); i++)
        precache_model(KNIFES[i][V_MDL])
}

public 
client_putinserver(id)
{
    
    g_iUse
[id][g_iModel[id]] = 0
    g_iModel
[id] = 0
    g_iUse
[id][0] = 1
}

public 
menu(id)
{
    new text[40], iMenu menu_create("\r[\yPhantom - Gamers\r] \wmenu de fakas""handlermenu");

    for(new isizeof(KNIFES); i++)
    {
        if(!g_iUse[id][i])
            formatex(textcharsmax(text), "%s \r[\ySeleccionar\r]"KNIFES[i][NAME])

        else
            formatex(textcharsmax(text), "%s \r[Usando\r]"KNIFES[i][NAME])
        
        menu_additem
(iMenutext__)
    }

    menu_display(idiMenu)
    return PLUGIN_HANDLED
}

public 
handlermenu(idmenuitem)
{
    if(item == MENU_EXIT)
    {
        menu_destroy(menu)
        return PLUGIN_HANDLED
    
}

    g_iUse[id][g_iModel[id]] = 0
    g_iUse
[id][item] = 1
    g_iModel
[id] = item
    client_print
(idprint_chat"[Phantom - Gamers] Seleccionaste la Faka %s"KNIFES[item][NAME])

    menu_destroy(menu)
    return PLUGIN_HANDLED
}

public 
HamItemDeploy(iEntity)
{
    new id get_pdata_cbase(iEntity414)
    entity_set_string(idEV_SZ_viewmodelKNIFES[g_iModel[id]][V_MDL])

Responder
#2
Código PHP:
new const KNIFES[][DATA] = {
    {
"Cuchillo Normal""models/v_knife.mdl"},
    {
"Valorant""models/phantom/v_valorant.mdl"},
    {
"Karambit""models/phantom/v_karambitphantom.mdl"},
    {
"Bayoneta m9""models/phantom/v_m9phantom.mdl"},
    {
"Butterfly""models/phantom/v_mariposaphantom.mdl"},
    {
"Las""models/phantom/v_mariposaphantom.mdl"},
    {
"Que""models/phantom/v_mariposaphantom.mdl"},
    {
"Desees""models/phantom/v_mariposaphantom.mdl"},
    {
"Puedes""models/phantom/v_mariposaphantom.mdl"},
    {
"Poner""models/phantom/v_mariposaphantom.mdl"}


Responder
#3
(11/11/2022, 12:46 PM)[N]drs escribió:
Código PHP:
new const KNIFES[][DATA] = {
    {"Cuchillo Normal""models/v_knife.mdl"},
    {"Valorant""models/phantom/v_valorant.mdl"},
    {"Karambit""models/phantom/v_karambitphantom.mdl"},
    {"Bayoneta m9""models/phantom/v_m9phantom.mdl"},
    {"Butterfly""models/phantom/v_mariposaphantom.mdl"},
    {"Las""models/phantom/v_mariposaphantom.mdl"},
    {"Que""models/phantom/v_mariposaphantom.mdl"},
    {"Desees""models/phantom/v_mariposaphantom.mdl"},
    {"Puedes""models/phantom/v_mariposaphantom.mdl"},
    {"Poner""models/phantom/v_mariposaphantom.mdl"}



funciono perfecto muchas gracias
Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)