[Ajuda] Extras Itens Hitskin_logo Hitskin.com

Isto é uma pré-visualização de um tema em Hitskin.com
Instalar o temaVoltar para a ficha do tema

Zplague

Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.

Seu portal de Zombie Plague no Brasil

Zumbis Online

Últimos assuntos

» [ANÚNCIO] Alguem vivo ai?
por Eclipse 17/9/2024, 6:39 pm

» The Fen1xS CLan | Zombie Plague | [XP/LEVELS] #2024
por hevy 5/7/2024, 8:28 pm

»
por Eclipse 29/2/2024, 12:30 am

» [Plugin] /vm Com Status
por Isr7 4/6/2023, 3:24 pm

» Alguém pra manter um servidor comigo?
por Isr7 3/6/2023, 4:52 pm

» Alguém querendo criar um servidor de zp? eu pago a host quem quiser deixar o discord ai Isr7#6920
por Isr7 3/6/2023, 3:18 pm

» PEDIDO: Multijump pros VIP
por Madness 15/3/2023, 3:44 pm

» [ZP] Modo padre para 5.0
por XperitosEspetinho123 15/7/2022, 3:31 pm

» [KZ] Servidores de cs 1.6
por [Dk]Serial-Killer 7/5/2022, 4:12 am

» [PLUGIN BY SKVD & WILLIAN] SHOP DE FANTASIAS
por dushowW 23/7/2020, 5:44 pm

Os membros mais ativos da semana

Nenhum usuário

Frases filosóficas Zplague:

....

Google Adsense

Estatísticas

Os nossos membros postaram um total de 38140 mensagens em 6680 assuntos

Temos 2796 usuários registrados

O último membro registrado é zmplugins - Henrique


3 participantes

    [Ajuda] Extras Itens

    waLLzyk
    waLLzyk
    Designer


    Nick : zetequila
    Masculino Número de Mensagens : 484
    Ammo Packs : 4482
    Honra : 56
    Data de inscrição : 22/05/2013

    [Ajuda] Extras Itens Empty [Ajuda] Extras Itens

    Mensagem por waLLzyk 16/6/2013, 2:52 pm

    Estava customizando umas .sma, pra ficar com as siglas do nome do server.
    Mas eu colocava pra ficar Red, algumas ficava outras não.


    Alguem pode me explicar o que devo fazer ?


    Imagem :
    [Ajuda] Extras Itens 8a893a55c3cf7d67f4f74b730c1ab1e7

    Estava colocando assim : 

    // Register Zombie Plague extra item
    g_itemid = zp_register_extra_item("Cinder M4A1 \r[BNVD]", 70, ZP_TEAM_HUMAN)

    Sma da Cinder : 
    Sma Cinder:

    Sma do Kit De Damage :
    Kit De Damage:

    Agradeço quem me ajudar REP+
    Dexter
    Dexter
    Humano


    Nick : Dexter
    Masculino Número de Mensagens : 913
    '-'
    Ammo Packs : 3678
    Honra : -3
    Data de inscrição : 28/04/2013

    [Ajuda] Extras Itens Empty Re: [Ajuda] Extras Itens

    Mensagem por Dexter 16/6/2013, 4:43 pm

    tenta agora
    OBS: não testei 

    Código:
    #include
    #include
    #include <   fun >
    #include
    #include
    #include

    #define is_valid_player(%1) (1 <= %1 <= 32)

    new M4_V_MODEL[64] = "models/zombie_plague/v_m4a1_super_new_v1.mdl"
    new M4_P_MODEL[64] = "models/zombie_plague/p_m4a1_super_new_v1.mdl"

    /* Pcvars */
    new cvar_dmgmultiplier, cvar_goldbullets,  cvar_custommodel, cvar_uclip

    // Item ID
    new g_itemid

    new bool:g_HasM4[33]

    new g_hasZoom[ 33 ]
    new bullets[ 33 ]

    // Sprite
    new m_spriteTexture

    const Wep_m4a1 = ((1<
    public plugin_init()
    {

    /* CVARS */
    cvar_dmgmultiplier = register_cvar("zp_goldenm4_dmg_multiplier", "12")
    cvar_custommodel = register_cvar("zp_goldenm4_custom_model", "1")
    cvar_goldbullets = register_cvar("zp_goldenm4_gold_bullets", "1")
    cvar_uclip = register_cvar("zp_goldenm4_unlimited_clip", "1")

    // Register The Plugin
    register_plugin("[ZP] Extra: Cinder M4A1 \r [BNVD]", "1.1", "Bill=Thailand=[UP]")
    // Register Zombie Plague extra item
    g_itemid = zp_register_extra_item("Cinder M4A1 \r [BNVD]", 70, ZP_TEAM_HUMAN)
    // Death Msg
    register_event("DeathMsg", "Death", "a")
    // Weapon Pick Up
    register_event("WeapPickup","checkModel","b","1=19")
    // Current Weapon Event
    register_event("CurWeapon","checkWeapon","be","1=1")
    register_event("CurWeapon", "make_tracer", "be", "1=1", "3>0")
    // Ham TakeDamage
    RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")
    register_forward( FM_CmdStart, "fw_CmdStart" )
    RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1)

    }

    public client_connect(id)
    {
    g_HasM4[id] = false
    }

    public client_disconnect(id)
    {
    g_HasM4[id] = false
    }

    public Death()
    {
    g_HasM4[read_data(2)] = false
    }

    public fwHamPlayerSpawnPost(id)
    {
    g_HasM4[id] = false
    }

    public plugin_precache()
    {
    precache_model(M4_V_MODEL)
    precache_model(M4_P_MODEL)
    m_spriteTexture = precache_model("sprites/dot.spr")
    precache_sound("weapons/zoom.wav")
    }

    public zp_user_infected_post(id)
    {
    if (zp_get_user_zombie(id))
    {
    g_HasM4[id] = false
    }
    }

    public checkModel(id)
    {
    if ( zp_get_user_zombie(id) )
    return PLUGIN_HANDLED

    new szWeapID = read_data(2)

    if ( szWeapID == CSW_M4A1 && g_HasM4[id] == true && get_pcvar_num(cvar_custommodel) )
    {
    set_pev(id, pev_viewmodel2, M4_V_MODEL)
    set_pev(id, pev_weaponmodel2, M4_P_MODEL)
    }
    return PLUGIN_HANDLED
    }

    public checkWeapon(id)
    {
    new plrClip, plrAmmo, plrWeap[32]
    new plrWeapId

    plrWeapId = get_user_weapon(id, plrClip , plrAmmo)

    if (plrWeapId == CSW_M4A1 && g_HasM4[id])
    {
    checkModel(id)
    }
    else
    {
    return PLUGIN_CONTINUE
    }

    if (plrClip == 0 && get_pcvar_num(cvar_uclip))
    {
    // If the user is out of ammo..
    get_weaponname(plrWeapId, plrWeap, 31)
    // Get the name of their weapon
    give_item(id, plrWeap)
    engclient_cmd(id, plrWeap)
    engclient_cmd(id, plrWeap)
    engclient_cmd(id, plrWeap)
    }
    return PLUGIN_HANDLED
    }



    public fw_TakeDamage(victim, inflictor, attacker, Float:damage)
    {
        if ( is_valid_player( attacker ) && get_user_weapon(attacker) == CSW_M4A1 && g_HasM4[attacker] )
        {
            SetHamParamFloat(4, damage * get_pcvar_float( cvar_dmgmultiplier ) )
        }
    }

    public fw_CmdStart( id, uc_handle, seed )
    {
    if( !is_user_alive( id ) )
    return PLUGIN_HANDLED

    if( ( get_uc( uc_handle, UC_Buttons ) & IN_ATTACK2 ) && !( pev( id, pev_oldbuttons ) & IN_ATTACK2 ) )
    {
    new szClip, szAmmo
    new szWeapID = get_user_weapon( id, szClip, szAmmo )

    if( szWeapID == CSW_M4A1 && g_HasM4[id] == true && !g_hasZoom[id] == true)
    {
    g_hasZoom[id] = true
    cs_set_user_zoom( id, CS_SET_AUGSG552_ZOOM, 0 )
    emit_sound( id, CHAN_ITEM, "weapons/zoom.wav", 0.20, 2.40, 0, 100 )
    }

    else if ( szWeapID == CSW_M4A1 && g_HasM4[id] == true && g_hasZoom[id])
    {
    g_hasZoom[ id ] = false
    cs_set_user_zoom( id, CS_RESET_ZOOM, 0 )

    }

    }
    return PLUGIN_HANDLED
    }


    public make_tracer(id)
    {
    if (get_pcvar_num(cvar_goldbullets))
    {
    new clip,ammo
    new wpnid = get_user_weapon(id,clip,ammo)
    new pteam[16]

    get_user_team(id, pteam, 15)

    if ((bullets[id] > clip) && (wpnid == CSW_M4A1) && g_HasM4[id])
    {
    new vec1[3], vec2[3]
    get_user_origin(id, vec1, 1) // origin; your camera point.
    get_user_origin(id, vec2, 4) // termina; where your bullet goes (4 is cs-only)


    //BEAMENTPOINTS
    message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
    write_byte (0)     //TE_BEAMENTPOINTS 0
    write_coord(vec1[0])
    write_coord(vec1[1])
    write_coord(vec1[2])
    write_coord(vec2[0])
    write_coord(vec2[1])
    write_coord(vec2[2])
    write_short( m_spriteTexture )
    write_byte(1) // framestart
    write_byte(5) // framerate
    write_byte(2) // life
    write_byte(10) // width
    write_byte(0) // noise
    write_byte( 30 )     // r, g, b
    write_byte( 144 )       // r, g, b
    write_byte( 255 )       // r, g, b
    write_byte(200) // brightness
    write_byte(150) // speed
    message_end()
    }

    bullets[id] = clip
    }

    }

    public zp_extra_item_selected(player, itemid)
    {
    if ( itemid == g_itemid )
    {
    if ( user_has_weapon(player, CSW_M4A1) )
    {
    drop_prim(player)
    }

    give_item(player, "weapon_m4a1")
    client_print(player, print_chat, "[ZP] Voce comprou Golden M4A1")
    g_HasM4[player] = true;
    }
    }

    stock drop_prim(id)
    {
    new weapons[32], num
    get_user_weapons(id, weapons, num)
    for (new i = 0; i < num; i++) {
    if (Wep_m4a1 & (1<{
    static wname[32]
    get_weaponname(weapons[i], wname, sizeof wname - 1)
    engclient_cmd(id, "drop", wname)
    }
    }
    }
    waLLzyk
    waLLzyk
    Designer


    Nick : zetequila
    Masculino Número de Mensagens : 484
    Ammo Packs : 4482
    Honra : 56
    Data de inscrição : 22/05/2013

    [Ajuda] Extras Itens Empty Re: [Ajuda] Extras Itens

    Mensagem por waLLzyk 16/6/2013, 5:44 pm

    Bom, eu tentei compila mas deu Compilação abortada 16 erros.
    Mas Vlw Dexter, vc ajuda todo mundo Zplague12
    [P]erfec[T] [S]cr[@]s[H]
    [P]erfec[T] [S]cr[@]s[H]
    Scripter


    Masculino Número de Mensagens : 564
    Jogador FODA Perfect Scrash entrou na zplague
    Ammo Packs : 4545
    Honra : 177
    Data de inscrição : 04/04/2013

    [Ajuda] Extras Itens Empty Re: [Ajuda] Extras Itens

    Mensagem por [P]erfec[T] [S]cr[@]s[H] 16/6/2013, 5:54 pm

    Tenta compilar agora:

    Código:
    #include <amxmodx>
    #include <fakemeta>
    #include <  fun >
    #include <hamsandwich>
    #include <cstrike>
    #include <zombieplague>


    #define is_valid_player(%1) (1 <= %1 <= 32)

    new M4_V_MODEL[64] = "models/zombie_plague/v_m4a1_super_new_v1.mdl"
    new M4_P_MODEL[64] = "models/zombie_plague/p_m4a1_super_new_v1.mdl"

    /* Pcvars */
    new cvar_dmgmultiplier, cvar_goldbullets,  cvar_custommodel, cvar_uclip

    // Item ID
    new g_itemid

    new bool:g_HasM4[33]

    new g_hasZoom[ 33 ]
    new bullets[ 33 ]

    // Sprite
    new m_spriteTexture

    const Wep_m4a1 = ((1<
    public plugin_init()
    {

    /* CVARS */
    cvar_dmgmultiplier = register_cvar("zp_goldenm4_dmg_multiplier", "12")
    cvar_custommodel = register_cvar("zp_goldenm4_custom_model", "1")
    cvar_goldbullets = register_cvar("zp_goldenm4_gold_bullets", "1")
    cvar_uclip = register_cvar("zp_goldenm4_unlimited_clip", "1")

    // Register The Plugin
    register_plugin("[ZP] Extra: Cinder M4A1 \r [BNVD]", "1.1", "Bill=Thailand=[UP]")
    // Register Zombie Plague extra item
    g_itemid = zp_register_extra_item("Cinder M4A1 \r [BNVD]", 70, ZP_TEAM_HUMAN)
    // Death Msg
    register_event("DeathMsg", "Death", "a")
    // Weapon Pick Up
    register_event("WeapPickup","checkModel","b","1=19")
    // Current Weapon Event
    register_event("CurWeapon","checkWeapon","be","1=1")
    register_event("CurWeapon", "make_tracer", "be", "1=1", "3>0")
    // Ham TakeDamage
    RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")
    register_forward( FM_CmdStart, "fw_CmdStart" )
    RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1)

    }

    public client_connect(id)
    {
    g_HasM4[id] = false
    }

    public client_disconnect(id)
    {
    g_HasM4[id] = false
    }

    public Death()
    {
    g_HasM4[read_data(2)] = false
    }

    public fwHamPlayerSpawnPost(id)
    {
    g_HasM4[id] = false
    }

    public plugin_precache()
    {
    precache_model(M4_V_MODEL)
    precache_model(M4_P_MODEL)
    m_spriteTexture = precache_model("sprites/dot.spr")
    precache_sound("weapons/zoom.wav")
    }

    public zp_user_infected_post(id)
    {
    if (zp_get_user_zombie(id))
    {
    g_HasM4[id] = false
    }
    }

    public checkModel(id)
    {
    if ( zp_get_user_zombie(id) )
    return PLUGIN_HANDLED

    new szWeapID = read_data(2)

    if ( szWeapID == CSW_M4A1 && g_HasM4[id] == true && get_pcvar_num(cvar_custommodel) )
    {
    set_pev(id, pev_viewmodel2, M4_V_MODEL)
    set_pev(id, pev_weaponmodel2, M4_P_MODEL)
    }
    return PLUGIN_HANDLED
    }

    public checkWeapon(id)
    {
    new plrClip, plrAmmo, plrWeap[32]
    new plrWeapId

    plrWeapId = get_user_weapon(id, plrClip , plrAmmo)

    if (plrWeapId == CSW_M4A1 && g_HasM4[id])
    {
    checkModel(id)
    }
    else
    {
    return PLUGIN_CONTINUE
    }

    if (plrClip == 0 && get_pcvar_num(cvar_uclip))
    {
    // If the user is out of ammo..
    get_weaponname(plrWeapId, plrWeap, 31)
    // Get the name of their weapon
    give_item(id, plrWeap)
    engclient_cmd(id, plrWeap)
    engclient_cmd(id, plrWeap)
    engclient_cmd(id, plrWeap)
    }
    return PLUGIN_HANDLED
    }



    public fw_TakeDamage(victim, inflictor, attacker, Float:damage)
    {
        if ( is_valid_player( attacker ) && get_user_weapon(attacker) == CSW_M4A1 && g_HasM4[attacker] )
        {
            SetHamParamFloat(4, damage * get_pcvar_float( cvar_dmgmultiplier ) )
        }
    }

    public fw_CmdStart( id, uc_handle, seed )
    {
    if( !is_user_alive( id ) )
    return PLUGIN_HANDLED

    if( ( get_uc( uc_handle, UC_Buttons ) & IN_ATTACK2 ) && !( pev( id, pev_oldbuttons ) & IN_ATTACK2 ) )
    {
    new szClip, szAmmo
    new szWeapID = get_user_weapon( id, szClip, szAmmo )

    if( szWeapID == CSW_M4A1 && g_HasM4[id] == true && !g_hasZoom[id] == true)
    {
    g_hasZoom[id] = true
    cs_set_user_zoom( id, CS_SET_AUGSG552_ZOOM, 0 )
    emit_sound( id, CHAN_ITEM, "weapons/zoom.wav", 0.20, 2.40, 0, 100 )
    }

    else if ( szWeapID == CSW_M4A1 && g_HasM4[id] == true && g_hasZoom[id])
    {
    g_hasZoom[ id ] = false
    cs_set_user_zoom( id, CS_RESET_ZOOM, 0 )

    }

    }
    return PLUGIN_HANDLED
    }


    public make_tracer(id)
    {
    if (get_pcvar_num(cvar_goldbullets))
    {
    new clip,ammo
    new wpnid = get_user_weapon(id,clip,ammo)
    new pteam[16]

    get_user_team(id, pteam, 15)

    if ((bullets[id] > clip) && (wpnid == CSW_M4A1) && g_HasM4[id])
    {
    new vec1[3], vec2[3]
    get_user_origin(id, vec1, 1) // origin; your camera point.
    get_user_origin(id, vec2, 4) // termina; where your bullet goes (4 is cs-only)


    //BEAMENTPOINTS
    message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
    write_byte (0)     //TE_BEAMENTPOINTS 0
    write_coord(vec1[0])
    write_coord(vec1[1])
    write_coord(vec1[2])
    write_coord(vec2[0])
    write_coord(vec2[1])
    write_coord(vec2[2])
    write_short( m_spriteTexture )
    write_byte(1) // framestart
    write_byte(5) // framerate
    write_byte(2) // life
    write_byte(10) // width
    write_byte(0) // noise
    write_byte( 30 )     // r, g, b
    write_byte( 144 )       // r, g, b
    write_byte( 255 )       // r, g, b
    write_byte(200) // brightness
    write_byte(150) // speed
    message_end()
    }

    bullets[id] = clip
    }

    }

    public zp_extra_item_selected(player, itemid)
    {
    if ( itemid == g_itemid )
    {
    if ( user_has_weapon(player, CSW_M4A1) )
    {
    drop_prim(player)
    }

    give_item(player, "weapon_m4a1")
    client_print(player, print_chat, "[ZP] Voce comprou Golden M4A1")
    g_HasM4[player] = true;
    }
    }

    stock drop_prim(id)
    {
    new weapons[32], num
    get_user_weapons(id, weapons, num)
    for (new i = 0; i < num; i++) {
    if (Wep_m4a1 & (1<{
    static wname[32]
    get_weaponname(weapons[i], wname, sizeof wname - 1)
    engclient_cmd(id, "drop", wname)
    }
    }
    }

    Espero Ter Ajudado !!!!!!!!!
    waLLzyk
    waLLzyk
    Designer


    Nick : zetequila
    Masculino Número de Mensagens : 484
    Ammo Packs : 4482
    Honra : 56
    Data de inscrição : 22/05/2013

    [Ajuda] Extras Itens Empty Re: [Ajuda] Extras Itens

    Mensagem por waLLzyk 16/6/2013, 5:58 pm

    [quote="[P]erfec[T] [S]cr[@]s[H]"]Tenta compilar agora:

    Código:
    #include <amxmodx>
    #include <fakemeta>
    #include <   fun >
    #include <hamsandwich>
    #include <cstrike>
    #include <zombieplague>


    #define is_valid_player(%1) (1 <= %1 <= 32)

    new M4_V_MODEL[64] = "models/zombie_plague/v_m4a1_super_new_v1.mdl"
    new M4_P_MODEL[64] = "models/zombie_plague/p_m4a1_super_new_v1.mdl"

    /* Pcvars */
    new cvar_dmgmultiplier, cvar_goldbullets,  cvar_custommodel, cvar_uclip

    // Item ID
    new g_itemid

    new bool:g_HasM4[33]

    new g_hasZoom[ 33 ]
    new bullets[ 33 ]

    // Sprite
    new m_spriteTexture

    const Wep_m4a1 = ((1<
    public plugin_init()
    {

    /* CVARS */
    cvar_dmgmultiplier = register_cvar("zp_goldenm4_dmg_multiplier", "12")
    cvar_custommodel = register_cvar("zp_goldenm4_custom_model", "1")
    cvar_goldbullets = register_cvar("zp_goldenm4_gold_bullets", "1")
    cvar_uclip = register_cvar("zp_goldenm4_unlimited_clip", "1")

    // Register The Plugin
    register_plugin("[ZP] Extra: Cinder M4A1 \r [BNVD]", "1.1", "Bill=Thailand=[UP]")
    // Register Zombie Plague extra item
    g_itemid = zp_register_extra_item("Cinder M4A1 \r [BNVD]", 70, ZP_TEAM_HUMAN)
    // Death Msg
    register_event("DeathMsg", "Death", "a")
    // Weapon Pick Up
    register_event("WeapPickup","checkModel","b","1=19")
    // Current Weapon Event
    register_event("CurWeapon","checkWeapon","be","1=1")
    register_event("CurWeapon", "make_tracer", "be", "1=1", "3>0")
    // Ham TakeDamage
    RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")
    register_forward( FM_CmdStart, "fw_CmdStart" )
    RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1)

    }

    public client_connect(id)
    {
    g_HasM4[id] = false
    }

    public client_disconnect(id)
    {
    g_HasM4[id] = false
    }

    public Death()
    {
    g_HasM4[read_data(2)] = false
    }

    public fwHamPlayerSpawnPost(id)
    {
    g_HasM4[id] = false
    }

    public plugin_precache()
    {
    precache_model(M4_V_MODEL)
    precache_model(M4_P_MODEL)
    m_spriteTexture = precache_model("sprites/dot.spr")
    precache_sound("weapons/zoom.wav")
    }

    public zp_user_infected_post(id)
    {
    if (zp_get_user_zombie(id))
    {
    g_HasM4[id] = false
    }
    }

    public checkModel(id)
    {
    if ( zp_get_user_zombie(id) )
    return PLUGIN_HANDLED

    new szWeapID = read_data(2)

    if ( szWeapID == CSW_M4A1 && g_HasM4[id] == true && get_pcvar_num(cvar_custommodel) )
    {
    set_pev(id, pev_viewmodel2, M4_V_MODEL)
    set_pev(id, pev_weaponmodel2, M4_P_MODEL)
    }
    return PLUGIN_HANDLED
    }

    public checkWeapon(id)
    {
    new plrClip, plrAmmo, plrWeap[32]
    new plrWeapId

    plrWeapId = get_user_weapon(id, plrClip , plrAmmo)

    if (plrWeapId == CSW_M4A1 && g_HasM4[id])
    {
    checkModel(id)
    }
    else
    {
    return PLUGIN_CONTINUE
    }

    if (plrClip == 0 && get_pcvar_num(cvar_uclip))
    {
    // If the user is out of ammo..
    get_weaponname(plrWeapId, plrWeap, 31)
    // Get the name of their weapon
    give_item(id, plrWeap)
    engclient_cmd(id, plrWeap)
    engclient_cmd(id, plrWeap)
    engclient_cmd(id, plrWeap)
    }
    return PLUGIN_HANDLED
    }



    public fw_TakeDamage(victim, inflictor, attacker, Float:damage)
    {
        if ( is_valid_player( attacker ) && get_user_weapon(attacker) == CSW_M4A1 && g_HasM4[attacker] )
        {
            SetHamParamFloat(4, damage * get_pcvar_float( cvar_dmgmultiplier ) )
        }
    }

    public fw_CmdStart( id, uc_handle, seed )
    {
    if( !is_user_alive( id ) )
    return PLUGIN_HANDLED

    if( ( get_uc( uc_handle, UC_Buttons ) & IN_ATTACK2 ) && !( pev( id, pev_oldbuttons ) & IN_ATTACK2 ) )
    {
    new szClip, szAmmo
    new szWeapID = get_user_weapon( id, szClip, szAmmo )

    if( szWeapID == CSW_M4A1 && g_HasM4[id] == true && !g_hasZoom[id] == true)
    {
    g_hasZoom[id] = true
    cs_set_user_zoom( id, CS_SET_AUGSG552_ZOOM, 0 )
    emit_sound( id, CHAN_ITEM, "weapons/zoom.wav", 0.20, 2.40, 0, 100 )
    }

    else if ( szWeapID == CSW_M4A1 && g_HasM4[id] == true && g_hasZoom[id])
    {
    g_hasZoom[ id ] = false
    cs_set_user_zoom( id, CS_RESET_ZOOM, 0 )

    }

    }
    return PLUGIN_HANDLED
    }


    public make_tracer(id)
    {
    if (get_pcvar_num(cvar_goldbullets))
    {
    new clip,ammo
    new wpnid = get_user_weapon(id,clip,ammo)
    new pteam[16]

    get_user_team(id, pteam, 15)

    if ((bullets[id] > clip) && (wpnid == CSW_M4A1) && g_HasM4[id])
    {
    new vec1[3], vec2[3]
    get_user_origin(id, vec1, 1) // origin; your camera point.
    get_user_origin(id, vec2, 4) // termina; where your bullet goes (4 is cs-only)


    //BEAMENTPOINTS
    message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
    write_byte (0)     //TE_BEAMENTPOINTS 0
    write_coord(vec1[0])
    write_coord(vec1[1])
    write_coord(vec1[2])
    write_coord(vec2[0])
    write_coord(vec2[1])
    write_coord(vec2[2])
    write_short( m_spriteTexture )
    write_byte(1) // framestart
    write_byte(5) // framerate
    write_byte(2) // life
    write_byte(10) // width
    write_byte(0) // noise
    write_byte( 30 )     // r, g, b
    write_byte( 144 )       // r, g, b
    write_byte( 255 )       // r, g, b
    write_byte(200) // brightness
    write_byte(150) // speed
    message_end()
    }

    bullets[id] = clip
    }

    }

    public zp_extra_item_selected(player, itemid)
    {
    if ( itemid == g_itemid )
    {
    if ( user_has_weapon(player, CSW_M4A1) )
    {
    drop_prim(player)
    }

    give_item(player, "weapon_m4a1")
    client_print(player, print_chat, "[ZP] Voce comprou Golden M4A1")
    g_HasM4[player] = true;
    }
    }

    stock drop_prim(id)
    {
    new weapons[32], num
    get_user_weapons(id, weapons, num)
    for (new i = 0; i < num; i++) {
    if (Wep_m4a1 & (1<{
    static wname[32]
    get_weaponname(weapons[i], wname, sizeof wname - 1)
    engclient_cmd(id, "drop", wname)
    }
    }
    }

    Também não deu, mas ja coloquei outro nome 
    Obrigado !
    [P]erfec[T] [S]cr[@]s[H]
    [P]erfec[T] [S]cr[@]s[H]
    Scripter


    Masculino Número de Mensagens : 564
    Jogador FODA Perfect Scrash entrou na zplague
    Ammo Packs : 4545
    Honra : 177
    Data de inscrição : 04/04/2013

    [Ajuda] Extras Itens Empty Re: [Ajuda] Extras Itens

    Mensagem por [P]erfec[T] [S]cr[@]s[H] 16/6/2013, 6:03 pm

    Tenta Agora. Desta vez eu vi o erro pelo amx studio e corrigi o erro.

    Código:
    #include <amxmodx>
    #include <fakemeta>
    #include < fun >
    #include <hamsandwich>
    #include <cstrike>
    #include <zombieplague>


    #define is_valid_player(%1) (1 <= %1 <= 32)

    new M4_V_MODEL[64] = "models/zombie_plague/v_m4a1_super_new_v1.mdl"
    new M4_P_MODEL[64] = "models/zombie_plague/p_m4a1_super_new_v1.mdl"

    /* Pcvars */
    new cvar_dmgmultiplier, cvar_goldbullets,  cvar_custommodel, cvar_uclip

    // Item ID
    new g_itemid

    new bool:g_HasM4[33]

    new g_hasZoom[ 33 ]
    new bullets[ 33 ]

    // Sprite
    new m_spriteTexture

    const Wep_m4a1 = ((1<<CSW_M4A1))
    public plugin_init()
    {

    /* CVARS */
    cvar_dmgmultiplier = register_cvar("zp_goldenm4_dmg_multiplier", "12")
    cvar_custommodel = register_cvar("zp_goldenm4_custom_model", "1")
    cvar_goldbullets = register_cvar("zp_goldenm4_gold_bullets", "1")
    cvar_uclip = register_cvar("zp_goldenm4_unlimited_clip", "1")

    // Register The Plugin
    register_plugin("[ZP] Extra: Cinder M4A1 \r [BNVD]", "1.1", "Bill=Thailand=[UP]")
    // Register Zombie Plague extra item
    g_itemid = zp_register_extra_item("Cinder M4A1 \r [BNVD]", 70, ZP_TEAM_HUMAN)
    // Death Msg
    register_event("DeathMsg", "Death", "a")
    // Weapon Pick Up
    register_event("WeapPickup","checkModel","b","1=19")
    // Current Weapon Event
    register_event("CurWeapon","checkWeapon","be","1=1")
    register_event("CurWeapon", "make_tracer", "be", "1=1", "3>0")
    // Ham TakeDamage
    RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")
    register_forward( FM_CmdStart, "fw_CmdStart" )
    RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1)

    }

    public client_connect(id)
    {
    g_HasM4[id] = false
    }

    public client_disconnect(id)
    {
    g_HasM4[id] = false
    }

    public Death()
    {
    g_HasM4[read_data(2)] = false
    }

    public fwHamPlayerSpawnPost(id)
    {
    g_HasM4[id] = false
    }

    public plugin_precache()
    {
    precache_model(M4_V_MODEL)
    precache_model(M4_P_MODEL)
    m_spriteTexture = precache_model("sprites/dot.spr")
    precache_sound("weapons/zoom.wav")
    }

    public zp_user_infected_post(id)
    {
    if (zp_get_user_zombie(id))
    {
    g_HasM4[id] = false
    }
    }

    public checkModel(id)
    {
    if ( zp_get_user_zombie(id) )
    return PLUGIN_HANDLED

    new szWeapID = read_data(2)

    if ( szWeapID == CSW_M4A1 && g_HasM4[id] == true && get_pcvar_num(cvar_custommodel) )
    {
    set_pev(id, pev_viewmodel2, M4_V_MODEL)
    set_pev(id, pev_weaponmodel2, M4_P_MODEL)
    }
    return PLUGIN_HANDLED
    }

    public checkWeapon(id)
    {
    new plrClip, plrAmmo, plrWeap[32]
    new plrWeapId

    plrWeapId = get_user_weapon(id, plrClip , plrAmmo)

    if (plrWeapId == CSW_M4A1 && g_HasM4[id])
    {
    checkModel(id)
    }
    else 
    {
    return PLUGIN_CONTINUE
    }

    if (plrClip == 0 && get_pcvar_num(cvar_uclip))
    {
    // If the user is out of ammo..
    get_weaponname(plrWeapId, plrWeap, 31)
    // Get the name of their weapon
    give_item(id, plrWeap)
    engclient_cmd(id, plrWeap) 
    engclient_cmd(id, plrWeap)
    engclient_cmd(id, plrWeap)
    }
    return PLUGIN_HANDLED
    }



    public fw_TakeDamage(victim, inflictor, attacker, Float:damage)
    {
        if ( is_valid_player( attacker ) && get_user_weapon(attacker) == CSW_M4A1 && g_HasM4[attacker] )
        {
            SetHamParamFloat(4, damage * get_pcvar_float( cvar_dmgmultiplier ) )
        }
    }

    public fw_CmdStart( id, uc_handle, seed )
    {
    if( !is_user_alive( id ) ) 
    return PLUGIN_HANDLED

    if( ( get_uc( uc_handle, UC_Buttons ) & IN_ATTACK2 ) && !( pev( id, pev_oldbuttons ) & IN_ATTACK2 ) )
    {
    new szClip, szAmmo
    new szWeapID = get_user_weapon( id, szClip, szAmmo )

    if( szWeapID == CSW_M4A1 && g_HasM4[id] == true && !g_hasZoom[id] == true)
    {
    g_hasZoom[id] = true
    cs_set_user_zoom( id, CS_SET_AUGSG552_ZOOM, 0 )
    emit_sound( id, CHAN_ITEM, "weapons/zoom.wav", 0.20, 2.40, 0, 100 )
    }

    else if ( szWeapID == CSW_M4A1 && g_HasM4[id] == true && g_hasZoom[id])
    {
    g_hasZoom[ id ] = false
    cs_set_user_zoom( id, CS_RESET_ZOOM, 0 )

    }

    }
    return PLUGIN_HANDLED
    }


    public make_tracer(id)
    {
    if (get_pcvar_num(cvar_goldbullets))
    {
    new clip,ammo
    new wpnid = get_user_weapon(id,clip,ammo)
    new pteam[16]

    get_user_team(id, pteam, 15)

    if ((bullets[id] > clip) && (wpnid == CSW_M4A1) && g_HasM4[id]) 
    {
    new vec1[3], vec2[3]
    get_user_origin(id, vec1, 1) // origin; your camera point.
    get_user_origin(id, vec2, 4) // termina; where your bullet goes (4 is cs-only)


    //BEAMENTPOINTS
    message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
    write_byte (0)     //TE_BEAMENTPOINTS 0
    write_coord(vec1[0])
    write_coord(vec1[1])
    write_coord(vec1[2])
    write_coord(vec2[0])
    write_coord(vec2[1])
    write_coord(vec2[2])
    write_short( m_spriteTexture )
    write_byte(1) // framestart
    write_byte(5) // framerate
    write_byte(2) // life
    write_byte(10) // width
    write_byte(0) // noise
    write_byte( 30 )     // r, g, b
    write_byte( 144 )       // r, g, b
    write_byte( 255 )       // r, g, b
    write_byte(200) // brightness
    write_byte(150) // speed
    message_end()
    }

    bullets[id] = clip
    }

    }

    public zp_extra_item_selected(player, itemid)
    {
    if ( itemid == g_itemid )
    {
    if ( user_has_weapon(player, CSW_M4A1) )
    {
    drop_prim(player)
    }

    give_item(player, "weapon_m4a1")
    client_print(player, print_chat, "[ZP] Voce comprou Golden M4A1")
    g_HasM4[player] = true;
    }
    }

    stock drop_prim(id) 
    {
       new weapons[32], num
       get_user_weapons(id, weapons, num)
       for (new i = 0; i < num; i++) {
          if (Wep_m4a1 & (1<<weapons[i])) 
          {
             static wname[32]
             get_weaponname(weapons[i], wname, sizeof wname - 1)
             engclient_cmd(id, "drop", wname)
          }
       }
    }

    Espero Ter Ajudado !!!!!!!
    waLLzyk
    waLLzyk
    Designer


    Nick : zetequila
    Masculino Número de Mensagens : 484
    Ammo Packs : 4482
    Honra : 56
    Data de inscrição : 22/05/2013

    [Ajuda] Extras Itens Empty Re: [Ajuda] Extras Itens

    Mensagem por waLLzyk 16/6/2013, 6:46 pm

    Compilei do jeito que esta ai, mas não deu certo ficou do jeito da imagem acima.

    Mas mesmo assim vlw pela atenção ! 

    Conteúdo patrocinado


    [Ajuda] Extras Itens Empty Re: [Ajuda] Extras Itens

    Mensagem por Conteúdo patrocinado


      Data/hora atual: 23/11/2024, 9:21 am