[Plugin] /am (Extra Items Para Adm) 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 [Dk]Serial-Killer Ontem à(s) 12:46 am

» 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

Frases filosóficas Zplague:

....

Google Adsense

Estatísticas

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

Temos 2796 usuários registrados

O último membro registrado é zmplugins - Henrique


+2
cabelozl
[P]erfec[T] [S]cr[@]s[H]
6 participantes

    [Plugin] /am (Extra Items Para Adm)

    [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 : 4548
    Honra : 177
    Data de inscrição : 04/04/2013

    [Plugin] /am (Extra Items Para Adm) Empty [Plugin] /am (Extra Items Para Adm)

    Mensagem por [P]erfec[T] [S]cr[@]s[H] 9/10/2013, 5:11 pm

    Ola Pessoal Vo Apresentar A vocês que querem colocar itens para ADM então esse plugin irá ser muito útil.

    Link: http://www.mediafire.com/download/ci183xbwjz4rpva/zm_admin.rar

    OBS: Já Esta com o status.

    Perguntas Provavelmente Frequentes:

    Como Colocar Item No /am?

    Aos que querem trollar: Colocando hora.

    Aos que gosta de ajudar:
    (Convertendo item vip para item adm)
    Coloca a include zmadmin e troque todas as palavas zv por za e tire a include zm_vip

    (Convertendo item extra para item extra para adm)
    Mesmo Esquema para converter pra vip a unica diferença que a include é zmadmin e as palavras za


    Última edição por [P]erfec[T] [S]cr[@]s[H] em 9/10/2013, 5:31 pm, editado 1 vez(es) (Motivo da edição : Corrigindo o erro.)
    cabelozl
    cabelozl
    Humano


    Masculino Número de Mensagens : 44
    Ammo Packs : 4079
    Honra : 3
    Data de inscrição : 30/09/2013

    [Plugin] /am (Extra Items Para Adm) Empty Re: [Plugin] /am (Extra Items Para Adm)

    Mensagem por cabelozl 9/10/2013, 5:17 pm

    [P]erfec[T] [S]cr[@]s[H] escreveu:Ola Pessoal Vo Apresentar A vocês que querem colocar itens para ADM então esse plugin irá ser muito útil.

    Link: http://www.mediafire.com/download/ci183xbwjz4rpva/zm_admin.rar

    OBS: Já Esta com o status.

    Perguntas Provavelmente Frequentes:

    Como Colocar Item No /am?

    Aos que querem trollar: Colocando hora.

    Aos que gosta de ajudar:
    (Convertendo item vip para item adm)
    Coloca a include zm_admin e troque todas as palavas zv por za e tire a include zm_vip

    (Convertendo item extra para item extra para adm)
    Mesmo Esquema para converter pra vip a unica diferença que a include é zm_admin e as palavras za
    mt bom:)

    @Edit

    faz o plugin do happy hour que fica la no canto :)

    Inicio: das 9 ate 12 noite
    Double AP: 1
    Clan: Nome do clan


    Última edição por cabelozl em 9/10/2013, 5:19 pm, editado 1 vez(es)
    Lucas157
    Lucas157
    Humano


    Nick : Lucas CB
    Masculino Número de Mensagens : 182
    Ahah venham style zombie plague 4.3 add skype lucas.cb5
    Ammo Packs : 4135
    Honra : -7
    Data de inscrição : 30/08/2013

    [Plugin] /am (Extra Items Para Adm) Empty Re: [Plugin] /am (Extra Items Para Adm)

    Mensagem por Lucas157 9/10/2013, 5:18 pm

    Voce ensino como troca um inten de vip pra adm, agora fala com trasnforma um inten normal, q aki so da erro ao compilar
    cabelozl
    cabelozl
    Humano


    Masculino Número de Mensagens : 44
    Ammo Packs : 4079
    Honra : 3
    Data de inscrição : 30/09/2013

    [Plugin] /am (Extra Items Para Adm) Empty Re: [Plugin] /am (Extra Items Para Adm)

    Mensagem por cabelozl 9/10/2013, 5:19 pm

    Lucas157 escreveu:Voce ensino como troca um inten de vip pra adm, agora fala com trasnforma um inten normal, q aki so da erro ao compilar
    manda sma do item que eu transformo pra vc para adm
    cabelozl
    cabelozl
    Humano


    Masculino Número de Mensagens : 44
    Ammo Packs : 4079
    Honra : 3
    Data de inscrição : 30/09/2013

    [Plugin] /am (Extra Items Para Adm) Empty Re: [Plugin] /am (Extra Items Para Adm)

    Mensagem por cabelozl 9/10/2013, 5:25 pm

    Lucas157 escreveu:adc skype: lucas.cb5
    nao tenho skype passa aki man
    Lucas157
    Lucas157
    Humano


    Nick : Lucas CB
    Masculino Número de Mensagens : 182
    Ahah venham style zombie plague 4.3 add skype lucas.cb5
    Ammo Packs : 4135
    Honra : -7
    Data de inscrição : 30/08/2013

    [Plugin] /am (Extra Items Para Adm) Empty Re: [Plugin] /am (Extra Items Para Adm)

    Mensagem por Lucas157 9/10/2013, 5:28 pm

    Código:
    #include <amxmodx>
    #include <cstrike>
    #include <engine>
    #include <fakemeta>
    #include <fakemeta_util>
    #include <  fun >
    #include <hamsandwich>
    #include <zombieplague>
    #include <ColorChat>
    #include <zm_vip>

    #define PLUGIN "[ZP] Extra-Item: AK47 Destroyer"
    #define VERSION "1.0"
    #define AUTHOR "AlejandroSk/Shidla"

    #define ITEM_NAME "AK47 Destroyer"
    #define ITEM_COST 100

    // ------------------------------------------------

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

    #define ENG_NULLENT    -1
    #define EV_INT_WEAPONKEY EV_INT_impulse
    #define WEAPONKEY    666

    #define CSW_WEAPON    CSW_AK47
    const CSW_Weapon =    ((1<<CSW_AK47))
    new const g_Ent[] =    "weapon_ak47"

    // ------------------------------------------------

    new g_ItemID

    new bool:g_Item[33]
    new g_Zoom[33]
    new g_Bullets[33]
    new m_spriteTexture

    new cvar_custommodel, cvar_zoom, cvar_uclip, cvar_dmgmultiplier
    new cvar_bullets, cvar_bulletsred, cvar_bulletsgreen, cvar_bulletsblue
    new cvar_red, cvar_green, cvar_blue

    new VIEW_MODEL[]    = "models/akdestroyer/v_Dynamic Style.mdl" // Model Personalizado
    new PLAYER_MODEL[]  = "models/akdestroyer/p_ak47.mdl" // Model Personalizado
    new WORLD_MODEL[]    = "models/akdestroyer/w_ak47.mdl" // Model Personalizado
    new OLDWORLD_MODEL[] = "models/w_ak47.mdl" // Model Original

    public plugin_init()
    {
      register_plugin(PLUGIN, VERSION, AUTHOR)

      g_ItemID = zv_register_extra_item(ITEM_NAME, ITEM_COST, ZV_TEAM_HUMAN)

      cvar_custommodel  = register_cvar("zp_destroyer_ak47_model",    "1")  // Modelo Personalizado
      cvar_bullets      = register_cvar("zp_destroyer_ak47_bullets",  "1")  // Rastro dp Tiro
      cvar_bulletsred    = register_cvar("zp_destroyer_ak47_bullets_r", "255") // Rastro do Tiro - Color R
      cvar_bulletsgreen  = register_cvar("zp_destroyer_ak47_bullets_g", "0") // Rastro do Tiro - Color G
      cvar_bulletsblue  = register_cvar("zp_destroyer_ak47_bullets_b", "0")  // Rastro do Tiro - Color B
      cvar_zoom    = register_cvar("zp_destroyer_ak47_zoom",      "1")  // Zoom igual da AUG
      cvar_uclip    = register_cvar("zp_destroyer_ak47_unclip",    "0")  // Munição Infinita
      cvar_dmgmultiplier = register_cvar("zp_destroyer_ak47_dmgx",      "3.0") // Multiplicação de Dano
      cvar_red = register_cvar ("zp_destroyer_ak47_glow_R", "255")
      cvar_green = register_cvar ("zp_destroyer_ak47_glow_G", "255")
      cvar_blue = register_cvar ("zp_destroyer_ak47_glow_B", "255")

      register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
      RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1)
      register_event("DeathMsg", "Death", "a")

      register_event("CurWeapon","checkWeapon","be","1=1")
      register_event("WeapPickup","checkModel","b","1=19")
      register_event("CurWeapon", "make_tracer", "be", "1=1", "3>0")
      register_forward(FM_SetModel, "fw_SetModel")
      register_forward(FM_CmdStart, "fw_CmdStart")
      RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")
      RegisterHam(Ham_Item_AddToPlayer, g_Ent, "fw_AddToPlayer")
    }

    public client_connect(id)
    {
      g_Item[id] = false
      g_Bullets[id] = false
      g_Zoom[id] = false
    }

    public client_disconnect(id)
    {
      g_Item[id] = false
      g_Bullets[id] = false
      g_Zoom[id] = false
    }

    public event_round_start()
    {
      for (new id = 1; id <= 32; id++)
      {
          if (!is_user_connected(id) || !is_user_alive(id))
            continue;

          if (g_Item[id])
          {
            g_Item[id] = false
            g_Bullets[id] = false
            g_Zoom[id] = false
          }
      }
    }

    public Death()
    {
      g_Item[read_data(2)] = false
      g_Bullets[read_data(2)] = false
      g_Zoom[read_data(2)] = false
    }

    public fwHamPlayerSpawnPost(id)
    {
      g_Item[id] = false
      g_Bullets[id] = false
      g_Zoom[id] = false
    }


    public fw_player_killed(victim, attacker, shouldgib)
    {
      if(g_Item[victim])
      {
          g_Item[victim] = false
          g_Bullets[victim] = false
          g_Zoom[victim] = false
      }
    }

    public zp_user_infected_post(infected, infector)
    {
      if (g_Item[infected])
      {
          g_Item[infected] = false
          g_Bullets[infected] = false
          g_Zoom[infected] = false
      }
    }

    public plugin_precache()
    {
      precache_model(VIEW_MODEL)
      precache_model(PLAYER_MODEL)
      precache_model(WORLD_MODEL)
      precache_sound("weapons/zoom.wav")
      m_spriteTexture = precache_model("sprites/dot.spr")
    }

    public zv_extra_item_selected(player, itemid)
    {
      new player_name[32]
      get_user_name(player, player_name, charsmax(player_name))

      if (itemid == g_ItemID)
      {
          if(user_has_weapon(player, CSW_WEAPON))
          {
            drop_prim(player)
          }
          g_Item[player] = true

          strip_user_weapons(player)
          give_item(player, "weapon_knife")
          give_item(player, "weapon_deagle")
          give_item(player, "weapon_ak47")
          give_item(player, "ammo_762nato")
          fm_set_rendering(player, kRenderFxGlowShell, (cvar_red), (cvar_green), (cvar_blue), kRenderNormal, 16);

          ColorChat(player, GREEN, "[ZP]^1 Voce Comprou^3 %s", ITEM_NAME)
      }
    }

    public checkWeapon(id)
    {
      new plrClip, plrAmmo, plrWeap[32]
      new plrWeapId
     
      plrWeapId = get_user_weapon(id, plrClip , plrAmmo)
     
      if (plrWeapId == CSW_WEAPON && g_Item[id])
      {
          checkModel(id)
      }
      else
      {
          return PLUGIN_CONTINUE
      }
     
      if (plrClip == 0 && get_pcvar_num(cvar_uclip))
      {
          get_weaponname(plrWeapId, plrWeap, 31)

          give_item(id, plrWeap)
          engclient_cmd(id, plrWeap)
          engclient_cmd(id, plrWeap)
          engclient_cmd(id, plrWeap)
      }
      return PLUGIN_HANDLED
    }

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

      new szWeapID = read_data(2)

      if (szWeapID == CSW_WEAPON && g_Item[id] == true && get_pcvar_num(cvar_custommodel))
      {
          set_pev(id, pev_viewmodel2, VIEW_MODEL)
          set_pev(id, pev_weaponmodel2, PLAYER_MODEL)
      }
      return PLUGIN_HANDLED
    }

    public make_tracer(id)
    {
      if (get_pcvar_num(cvar_bullets))
      {
          new clip,ammo
          new wpnid = get_user_weapon(id,clip,ammo)
          new pteam[16]
         
          get_user_team(id, pteam, 15)
         
          if ((g_Bullets[id] > clip) && (wpnid == CSW_WEAPON) && g_Item[id])
          {
            new vec1[3], vec2[3]
            get_user_origin(id, vec1, 1)
            get_user_origin(id, vec2, 4)

            message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
            write_byte (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(get_pcvar_num(cvar_bulletsred))  // R [R G B]
            write_byte(get_pcvar_num(cvar_bulletsgreen)) // G [R G B]
            write_byte(get_pcvar_num(cvar_bulletsblue))  // B [R G B]
            write_byte(200) // brightness
            write_byte(150) // speed
            message_end()
          }
          g_Bullets[id] = clip
      }
    }

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

          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_WEAPON && g_Item[id] == true && !g_Zoom[id] == true)
            {
                g_Zoom[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_WEAPON && g_Item[id] == true && g_Zoom[id])
            {
                g_Zoom[id] = false
                cs_set_user_zoom(id, CS_RESET_ZOOM, 0)
            }
          }
      }
      return PLUGIN_HANDLED
    }

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

    public fw_SetModel(entity, model[])
    {
      if(!is_valid_ent(entity))
          return FMRES_IGNORED;

      if(!equal(model, OLDWORLD_MODEL))
          return FMRES_IGNORED;

      static szClassName[33]
      entity_get_string(entity, EV_SZ_classname, szClassName, charsmax(szClassName))

      if(!equal(szClassName, "weaponbox"))
          return FMRES_IGNORED

      static iOwner, iStoredGalilID
      iOwner = entity_get_edict(entity, EV_ENT_owner)
      iStoredGalilID = find_ent_by_owner(ENG_NULLENT, g_Ent, entity)

      if(g_Item[iOwner] && is_valid_ent(iStoredGalilID))
      {
          g_Item[iOwner] = false
          entity_set_int(iStoredGalilID, EV_INT_WEAPONKEY, WEAPONKEY)
          entity_set_model(entity, WORLD_MODEL)

          return FMRES_SUPERCEDE
      }
      return FMRES_IGNORED
    }

    public fw_AddToPlayer(AK47, id)
    {
      if(is_valid_ent(AK47) && is_user_connected(id) && entity_get_int(AK47, EV_INT_WEAPONKEY) == WEAPONKEY)
      {
          g_Item[id] = true
          entity_set_int(AK47, EV_INT_WEAPONKEY, 0)

          return HAM_HANDLED
      }
      return HAM_IGNORED
    }

    stock drop_prim(id)
    {
      new weapons[32], num
      get_user_weapons(id, weapons, num)
      for (new i = 0; i < num; i++)
      {
          if (CSW_Weapon & (1<<weapons[i]))
          {
            static wname[32]
            get_weaponname(weapons[i], wname, sizeof wname - 1)
            engclient_cmd(id, "drop", wname)
          }
      }
    }
    /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
    *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1031\\ f0\\ fs16 \n\\ par }
    */
    Ela ja ta como vip, msm assim deu erro :S
    cabelozl
    cabelozl
    Humano


    Masculino Número de Mensagens : 44
    Ammo Packs : 4079
    Honra : 3
    Data de inscrição : 30/09/2013

    [Plugin] /am (Extra Items Para Adm) Empty Re: [Plugin] /am (Extra Items Para Adm)

    Mensagem por cabelozl 9/10/2013, 5:31 pm

    Lucas157 escreveu:
    Código:
    #include <amxmodx>
    #include <cstrike>
    #include <engine>
    #include <fakemeta>
    #include <fakemeta_util>
    #include <   fun >
    #include <hamsandwich>
    #include <zombieplague>
    #include <ColorChat>
    #include <zm_vip>

    #define PLUGIN "[ZP] Extra-Item: AK47 Destroyer"
    #define VERSION "1.0"
    #define AUTHOR "AlejandroSk/Shidla"

    #define ITEM_NAME "AK47 Destroyer"
    #define ITEM_COST 100

    // ------------------------------------------------

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

    #define ENG_NULLENT    -1
    #define EV_INT_WEAPONKEY EV_INT_impulse
    #define WEAPONKEY    666

    #define CSW_WEAPON    CSW_AK47
    const CSW_Weapon =     ((1<<CSW_AK47))
    new const g_Ent[] =     "weapon_ak47"

    // ------------------------------------------------

    new g_ItemID

    new bool:g_Item[33]
    new g_Zoom[33]
    new g_Bullets[33]
    new m_spriteTexture

    new cvar_custommodel, cvar_zoom, cvar_uclip, cvar_dmgmultiplier
    new cvar_bullets, cvar_bulletsred, cvar_bulletsgreen, cvar_bulletsblue
    new cvar_red, cvar_green, cvar_blue

    new VIEW_MODEL[]    = "models/akdestroyer/v_Dynamic Style.mdl" // Model Personalizado
    new PLAYER_MODEL[]  = "models/akdestroyer/p_ak47.mdl" // Model Personalizado
    new WORLD_MODEL[]    = "models/akdestroyer/w_ak47.mdl" // Model Personalizado
    new OLDWORLD_MODEL[] = "models/w_ak47.mdl" // Model Original

    public plugin_init()
    {
       register_plugin(PLUGIN, VERSION, AUTHOR)

       g_ItemID = zv_register_extra_item(ITEM_NAME, ITEM_COST, ZV_TEAM_HUMAN)

       cvar_custommodel  = register_cvar("zp_destroyer_ak47_model",    "1")  // Modelo Personalizado
       cvar_bullets      = register_cvar("zp_destroyer_ak47_bullets",  "1")  // Rastro dp Tiro
       cvar_bulletsred     = register_cvar("zp_destroyer_ak47_bullets_r", "255") // Rastro do Tiro - Color R
       cvar_bulletsgreen  = register_cvar("zp_destroyer_ak47_bullets_g", "0") // Rastro do Tiro - Color G
       cvar_bulletsblue  = register_cvar("zp_destroyer_ak47_bullets_b", "0")  // Rastro do Tiro - Color B
       cvar_zoom     = register_cvar("zp_destroyer_ak47_zoom",      "1")  // Zoom igual da AUG
       cvar_uclip     = register_cvar("zp_destroyer_ak47_unclip",    "0")  // Munição Infinita
       cvar_dmgmultiplier = register_cvar("zp_destroyer_ak47_dmgx",      "3.0") // Multiplicação de Dano
       cvar_red = register_cvar ("zp_destroyer_ak47_glow_R", "255")
       cvar_green = register_cvar ("zp_destroyer_ak47_glow_G", "255")
       cvar_blue = register_cvar ("zp_destroyer_ak47_glow_B", "255")

       register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
       RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1)
       register_event("DeathMsg", "Death", "a")

       register_event("CurWeapon","checkWeapon","be","1=1")
       register_event("WeapPickup","checkModel","b","1=19")
       register_event("CurWeapon", "make_tracer", "be", "1=1", "3>0")
       register_forward(FM_SetModel, "fw_SetModel")
       register_forward(FM_CmdStart, "fw_CmdStart")
       RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")
       RegisterHam(Ham_Item_AddToPlayer, g_Ent, "fw_AddToPlayer")
    }

    public client_connect(id)
    {
       g_Item[id] = false
       g_Bullets[id] = false
       g_Zoom[id] = false
    }

    public client_disconnect(id)
    {
       g_Item[id] = false
       g_Bullets[id] = false
       g_Zoom[id] = false
    }

    public event_round_start()
    {
       for (new id = 1; id <= 32; id++)
       {
          if (!is_user_connected(id) || !is_user_alive(id))
             continue;

          if (g_Item[id])
          {
             g_Item[id] = false
             g_Bullets[id] = false
             g_Zoom[id] = false
          }
       }
    }

    public Death()
    {
       g_Item[read_data(2)] = false
       g_Bullets[read_data(2)] = false
       g_Zoom[read_data(2)] = false
    }

    public fwHamPlayerSpawnPost(id)
    {
       g_Item[id] = false
       g_Bullets[id] = false
       g_Zoom[id] = false
    }


    public fw_player_killed(victim, attacker, shouldgib)
    {
       if(g_Item[victim])
       {
          g_Item[victim] = false
          g_Bullets[victim] = false
          g_Zoom[victim] = false
       }
    }

    public zp_user_infected_post(infected, infector)
    {
       if (g_Item[infected])
       {
          g_Item[infected] = false
          g_Bullets[infected] = false
          g_Zoom[infected] = false
       }
    }

    public plugin_precache()
    {
       precache_model(VIEW_MODEL)
       precache_model(PLAYER_MODEL)
       precache_model(WORLD_MODEL)
       precache_sound("weapons/zoom.wav")
       m_spriteTexture = precache_model("sprites/dot.spr")
    }

    public zv_extra_item_selected(player, itemid)
    {
       new player_name[32]
       get_user_name(player, player_name, charsmax(player_name))

       if (itemid == g_ItemID)
       {
          if(user_has_weapon(player, CSW_WEAPON))
          {
             drop_prim(player)
          }
          g_Item[player] = true

          strip_user_weapons(player)
          give_item(player, "weapon_knife")
          give_item(player, "weapon_deagle")
          give_item(player, "weapon_ak47")
          give_item(player, "ammo_762nato")
          fm_set_rendering(player, kRenderFxGlowShell, (cvar_red), (cvar_green), (cvar_blue), kRenderNormal, 16);

          ColorChat(player, GREEN, "[ZP]^1 Voce Comprou^3 %s", ITEM_NAME)
       }
    }

    public checkWeapon(id)
    {
       new plrClip, plrAmmo, plrWeap[32]
       new plrWeapId
      
       plrWeapId = get_user_weapon(id, plrClip , plrAmmo)
      
       if (plrWeapId == CSW_WEAPON && g_Item[id])
       {
          checkModel(id)
       }
       else
       {
          return PLUGIN_CONTINUE
       }
      
       if (plrClip == 0 && get_pcvar_num(cvar_uclip))
       {
          get_weaponname(plrWeapId, plrWeap, 31)

          give_item(id, plrWeap)
          engclient_cmd(id, plrWeap)
          engclient_cmd(id, plrWeap)
          engclient_cmd(id, plrWeap)
       }
       return PLUGIN_HANDLED
    }

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

       new szWeapID = read_data(2)

       if (szWeapID == CSW_WEAPON && g_Item[id] == true && get_pcvar_num(cvar_custommodel))
       {
          set_pev(id, pev_viewmodel2, VIEW_MODEL)
          set_pev(id, pev_weaponmodel2, PLAYER_MODEL)
       }
       return PLUGIN_HANDLED
    }

    public make_tracer(id)
    {
       if (get_pcvar_num(cvar_bullets))
       {
          new clip,ammo
          new wpnid = get_user_weapon(id,clip,ammo)
          new pteam[16]
          
          get_user_team(id, pteam, 15)
          
          if ((g_Bullets[id] > clip) && (wpnid == CSW_WEAPON) && g_Item[id])
          {
             new vec1[3], vec2[3]
             get_user_origin(id, vec1, 1)
             get_user_origin(id, vec2, 4)

             message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
             write_byte (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(get_pcvar_num(cvar_bulletsred))  // R [R G B]
             write_byte(get_pcvar_num(cvar_bulletsgreen)) // G [R G B]
             write_byte(get_pcvar_num(cvar_bulletsblue))  // B [R G B]
             write_byte(200) // brightness
             write_byte(150) // speed
             message_end()
          }
          g_Bullets[id] = clip
       }
    }

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

          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_WEAPON && g_Item[id] == true && !g_Zoom[id] == true)
             {
                g_Zoom[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_WEAPON && g_Item[id] == true && g_Zoom[id])
             {
                g_Zoom[id] = false
                cs_set_user_zoom(id, CS_RESET_ZOOM, 0)
             }
          }
       }
       return PLUGIN_HANDLED
    }

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

    public fw_SetModel(entity, model[])
    {
       if(!is_valid_ent(entity))
          return FMRES_IGNORED;

       if(!equal(model, OLDWORLD_MODEL))
          return FMRES_IGNORED;

       static szClassName[33]
       entity_get_string(entity, EV_SZ_classname, szClassName, charsmax(szClassName))

       if(!equal(szClassName, "weaponbox"))
          return FMRES_IGNORED

       static iOwner, iStoredGalilID
       iOwner = entity_get_edict(entity, EV_ENT_owner)
       iStoredGalilID = find_ent_by_owner(ENG_NULLENT, g_Ent, entity)

       if(g_Item[iOwner] && is_valid_ent(iStoredGalilID))
       {
          g_Item[iOwner] = false
          entity_set_int(iStoredGalilID, EV_INT_WEAPONKEY, WEAPONKEY)
          entity_set_model(entity, WORLD_MODEL)

          return FMRES_SUPERCEDE
       }
       return FMRES_IGNORED
    }

    public fw_AddToPlayer(AK47, id)
    {
       if(is_valid_ent(AK47) && is_user_connected(id) && entity_get_int(AK47, EV_INT_WEAPONKEY) == WEAPONKEY)
       {
          g_Item[id] = true
          entity_set_int(AK47, EV_INT_WEAPONKEY, 0)

          return HAM_HANDLED
       }
       return HAM_IGNORED
    }

    stock drop_prim(id)
    {
       new weapons[32], num
       get_user_weapons(id, weapons, num)
       for (new i = 0; i < num; i++)
       {
          if (CSW_Weapon & (1<<weapons[i]))
          {
             static wname[32]
             get_weaponname(weapons[i], wname, sizeof wname - 1)
             engclient_cmd(id, "drop", wname)
          }
       }
    }
    /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
    *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1031\\ f0\\ fs16 \n\\ par }
    */
    Ela ja ta como vip, msm assim deu erro :S
    vo por ela pra adm .......
    [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 : 4548
    Honra : 177
    Data de inscrição : 04/04/2013

    [Plugin] /am (Extra Items Para Adm) Empty Re: [Plugin] /am (Extra Items Para Adm)

    Mensagem por [P]erfec[T] [S]cr[@]s[H] 9/10/2013, 5:32 pm

    Testa:
    Código:
    #include <amxmodx>
    #include <cstrike>
    #include <engine>
    #include <fakemeta>
    #include <fakemeta_util>
    #include <   fun >
    #include <hamsandwich>
    #include <zombieplague>
    #include <ColorChat>
    #include <zmadmin>

    #define PLUGIN "[ZP] Extra-Item: AK47 Destroyer"
    #define VERSION "1.0"
    #define AUTHOR "AlejandroSk/Shidla"

    #define ITEM_NAME "AK47 Destroyer"
    #define ITEM_DESCRIPTION "1 Round"
    #define ITEM_COST 100

    // ------------------------------------------------

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

    #define ENG_NULLENT    -1
    #define EV_INT_WEAPONKEY EV_INT_impulse
    #define WEAPONKEY    666

    #define CSW_WEAPON    CSW_AK47
    const CSW_Weapon =    ((1<<CSW_AK47))
    new const g_Ent[] =    "weapon_ak47"

    // ------------------------------------------------

    new g_ItemID

    new bool:g_Item[33]
    new g_Zoom[33]
    new g_Bullets[33]
    new m_spriteTexture

    new cvar_custommodel, cvar_zoom, cvar_uclip, cvar_dmgmultiplier
    new cvar_bullets, cvar_bulletsred, cvar_bulletsgreen, cvar_bulletsblue
    new cvar_red, cvar_green, cvar_blue

    new VIEW_MODEL[]    = "models/akdestroyer/v_Dynamic Style.mdl" // Model Personalizado
    new PLAYER_MODEL[]  = "models/akdestroyer/p_ak47.mdl" // Model Personalizado
    new WORLD_MODEL[]    = "models/akdestroyer/w_ak47.mdl" // Model Personalizado
    new OLDWORLD_MODEL[] = "models/w_ak47.mdl" // Model Original

    public plugin_init()
    {
      register_plugin(PLUGIN, VERSION, AUTHOR)

      g_ItemID = za_register_extra_item(ITEM_NAME, ITEM_DESCRIPTION, ITEM_COST, ZA_TEAM_HUMAN)

      cvar_custommodel  = register_cvar("zp_destroyer_ak47_model",    "1")  // Modelo Personalizado
      cvar_bullets      = register_cvar("zp_destroyer_ak47_bullets",  "1")  // Rastro dp Tiro
      cvar_bulletsred    = register_cvar("zp_destroyer_ak47_bullets_r", "255") // Rastro do Tiro - Color R
      cvar_bulletsgreen  = register_cvar("zp_destroyer_ak47_bullets_g", "0") // Rastro do Tiro - Color G
      cvar_bulletsblue  = register_cvar("zp_destroyer_ak47_bullets_b", "0")  // Rastro do Tiro - Color B
      cvar_zoom    = register_cvar("zp_destroyer_ak47_zoom",      "1")  // Zoom igual da AUG
      cvar_uclip    = register_cvar("zp_destroyer_ak47_unclip",    "0")  // Munição Infinita
      cvar_dmgmultiplier = register_cvar("zp_destroyer_ak47_dmgx",      "3.0") // Multiplicação de Dano
      cvar_red = register_cvar ("zp_destroyer_ak47_glow_R", "255")
      cvar_green = register_cvar ("zp_destroyer_ak47_glow_G", "255")
      cvar_blue = register_cvar ("zp_destroyer_ak47_glow_B", "255")

      register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
      RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1)
      register_event("DeathMsg", "Death", "a")

      register_event("CurWeapon","checkWeapon","be","1=1")
      register_event("WeapPickup","checkModel","b","1=19")
      register_event("CurWeapon", "make_tracer", "be", "1=1", "3>0")
      register_forward(FM_SetModel, "fw_SetModel")
      register_forward(FM_CmdStart, "fw_CmdStart")
      RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")
      RegisterHam(Ham_Item_AddToPlayer, g_Ent, "fw_AddToPlayer")
    }

    public client_connect(id)
    {
      g_Item[id] = false
      g_Bullets[id] = false
      g_Zoom[id] = false
    }

    public client_disconnect(id)
    {
      g_Item[id] = false
      g_Bullets[id] = false
      g_Zoom[id] = false
    }

    public event_round_start()
    {
      for (new id = 1; id <= 32; id++)
      {
          if (!is_user_connected(id) || !is_user_alive(id))
            continue;

          if (g_Item[id])
          {
            g_Item[id] = false
            g_Bullets[id] = false
            g_Zoom[id] = false
          }
      }
    }

    public Death()
    {
      g_Item[read_data(2)] = false
      g_Bullets[read_data(2)] = false
      g_Zoom[read_data(2)] = false
    }

    public fwHamPlayerSpawnPost(id)
    {
      g_Item[id] = false
      g_Bullets[id] = false
      g_Zoom[id] = false
    }


    public fw_player_killed(victim, attacker, shouldgib)
    {
      if(g_Item[victim])
      {
          g_Item[victim] = false
          g_Bullets[victim] = false
          g_Zoom[victim] = false
      }
    }

    public zp_user_infected_post(infected, infector)
    {
      if (g_Item[infected])
      {
          g_Item[infected] = false
          g_Bullets[infected] = false
          g_Zoom[infected] = false
      }
    }

    public plugin_precache()
    {
      precache_model(VIEW_MODEL)
      precache_model(PLAYER_MODEL)
      precache_model(WORLD_MODEL)
      precache_sound("weapons/zoom.wav")
      m_spriteTexture = precache_model("sprites/dot.spr")
    }

    public za_extra_item_selected(player, itemid)
    {
      new player_name[32]
      get_user_name(player, player_name, charsmax(player_name))

      if (itemid == g_ItemID)
      {
          if(user_has_weapon(player, CSW_WEAPON))
          {
            drop_prim(player)
          }
          g_Item[player] = true

          strip_user_weapons(player)
          give_item(player, "weapon_knife")
          give_item(player, "weapon_deagle")
          give_item(player, "weapon_ak47")
          give_item(player, "ammo_762nato")
          fm_set_rendering(player, kRenderFxGlowShell, (cvar_red), (cvar_green), (cvar_blue), kRenderNormal, 16);

          ColorChat(player, GREEN, "[ZP]^1 Voce Comprou^3 %s", ITEM_NAME)
      }
    }

    public checkWeapon(id)
    {
      new plrClip, plrAmmo, plrWeap[32]
      new plrWeapId
      
      plrWeapId = get_user_weapon(id, plrClip , plrAmmo)
      
      if (plrWeapId == CSW_WEAPON && g_Item[id])
      {
          checkModel(id)
      }
      else
      {
          return PLUGIN_CONTINUE
      }
      
      if (plrClip == 0 && get_pcvar_num(cvar_uclip))
      {
          get_weaponname(plrWeapId, plrWeap, 31)

          give_item(id, plrWeap)
          engclient_cmd(id, plrWeap)
          engclient_cmd(id, plrWeap)
          engclient_cmd(id, plrWeap)
      }
      return PLUGIN_HANDLED
    }

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

      new szWeapID = read_data(2)

      if (szWeapID == CSW_WEAPON && g_Item[id] == true && get_pcvar_num(cvar_custommodel))
      {
          set_pev(id, pev_viewmodel2, VIEW_MODEL)
          set_pev(id, pev_weaponmodel2, PLAYER_MODEL)
      }
      return PLUGIN_HANDLED
    }

    public make_tracer(id)
    {
      if (get_pcvar_num(cvar_bullets))
      {
          new clip,ammo
          new wpnid = get_user_weapon(id,clip,ammo)
          new pteam[16]
          
          get_user_team(id, pteam, 15)
          
          if ((g_Bullets[id] > clip) && (wpnid == CSW_WEAPON) && g_Item[id])
          {
            new vec1[3], vec2[3]
            get_user_origin(id, vec1, 1)
            get_user_origin(id, vec2, 4)

            message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
            write_byte (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(get_pcvar_num(cvar_bulletsred))  // R [R G B]
            write_byte(get_pcvar_num(cvar_bulletsgreen)) // G [R G B]
            write_byte(get_pcvar_num(cvar_bulletsblue))  // B [R G B]
            write_byte(200) // brightness
            write_byte(150) // speed
            message_end()
          }
          g_Bullets[id] = clip
      }
    }

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

          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_WEAPON && g_Item[id] == true && !g_Zoom[id] == true)
            {
                g_Zoom[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_WEAPON && g_Item[id] == true && g_Zoom[id])
            {
                g_Zoom[id] = false
                cs_set_user_zoom(id, CS_RESET_ZOOM, 0)
            }
          }
      }
      return PLUGIN_HANDLED
    }

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

    public fw_SetModel(entity, model[])
    {
      if(!is_valid_ent(entity))
          return FMRES_IGNORED;

      if(!equal(model, OLDWORLD_MODEL))
          return FMRES_IGNORED;

      static szClassName[33]
      entity_get_string(entity, EV_SZ_classname, szClassName, charsmax(szClassName))

      if(!equal(szClassName, "weaponbox"))
          return FMRES_IGNORED

      static iOwner, iStoredGalilID
      iOwner = entity_get_edict(entity, EV_ENT_owner)
      iStoredGalilID = find_ent_by_owner(ENG_NULLENT, g_Ent, entity)

      if(g_Item[iOwner] && is_valid_ent(iStoredGalilID))
      {
          g_Item[iOwner] = false
          entity_set_int(iStoredGalilID, EV_INT_WEAPONKEY, WEAPONKEY)
          entity_set_model(entity, WORLD_MODEL)

          return FMRES_SUPERCEDE
      }
      return FMRES_IGNORED
    }

    public fw_AddToPlayer(AK47, id)
    {
      if(is_valid_ent(AK47) && is_user_connected(id) && entity_get_int(AK47, EV_INT_WEAPONKEY) == WEAPONKEY)
      {
          g_Item[id] = true
          entity_set_int(AK47, EV_INT_WEAPONKEY, 0)

          return HAM_HANDLED
      }
      return HAM_IGNORED
    }

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


    Nick : Lucas CB
    Masculino Número de Mensagens : 182
    Ahah venham style zombie plague 4.3 add skype lucas.cb5
    Ammo Packs : 4135
    Honra : -7
    Data de inscrição : 30/08/2013

    [Plugin] /am (Extra Items Para Adm) Empty Re: [Plugin] /am (Extra Items Para Adm)

    Mensagem por Lucas157 9/10/2013, 5:34 pm

    Erro :p
    cabelozl
    cabelozl
    Humano


    Masculino Número de Mensagens : 44
    Ammo Packs : 4079
    Honra : 3
    Data de inscrição : 30/09/2013

    [Plugin] /am (Extra Items Para Adm) Empty Re: [Plugin] /am (Extra Items Para Adm)

    Mensagem por cabelozl 9/10/2013, 5:36 pm

    Lucas157 escreveu:Erro :p
    testa ai mano



    Código:
    #include <amxmodx>
    #include <cstrike>
    #include <engine>
    #include <fakemeta>
    #include <fakemeta_util>
    #include <   fun >
    #include <hamsandwich>
    #include <zombieplague>
    #include <ColorChat>
    #include <zmadmin>

    #define PLUGIN "[ZP] Extra-Item: AK47 Destroyer"
    #define VERSION "1.0"
    #define AUTHOR "AlejandroSk/Shidla"

    #define ITEM_NAME "AK47 Destroyer"
    #define ITEM_COST 100

    // ------------------------------------------------

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

    #define ENG_NULLENT    -1
    #define EV_INT_WEAPONKEY EV_INT_impulse
    #define WEAPONKEY    666

    #define CSW_WEAPON    CSW_AK47
    const CSW_Weapon =    ((1<<CSW_AK47))
    new const g_Ent[] =    "weapon_ak47"

    // ------------------------------------------------

    new g_ItemID

    new bool:g_Item[33]
    new g_Zoom[33]
    new g_Bullets[33]
    new m_spriteTexture

    new cvar_custommodel, cvar_zoom, cvar_uclip, cvar_dmgmultiplier
    new cvar_bullets, cvar_bulletsred, cvar_bulletsgreen, cvar_bulletsblue
    new cvar_red, cvar_green, cvar_blue

    new VIEW_MODEL[]    = "models/akdestroyer/v_Dynamic Style.mdl" // Model Personalizado
    new PLAYER_MODEL[]  = "models/akdestroyer/p_ak47.mdl" // Model Personalizado
    new WORLD_MODEL[]    = "models/akdestroyer/w_ak47.mdl" // Model Personalizado
    new OLDWORLD_MODEL[] = "models/w_ak47.mdl" // Model Original

    public plugin_init()
    {
      register_plugin(PLUGIN, VERSION, AUTHOR)

      g_ItemID = za_register_extra_item("AK47", "Destroyer", 65, ZA_TEAM_HUMAN)

      cvar_custommodel  = register_cvar("zp_destroyer_ak47_model",    "1")  // Modelo Personalizado
      cvar_bullets      = register_cvar("zp_destroyer_ak47_bullets",  "1")  // Rastro dp Tiro
      cvar_bulletsred    = register_cvar("zp_destroyer_ak47_bullets_r", "255") // Rastro do Tiro - Color R
      cvar_bulletsgreen  = register_cvar("zp_destroyer_ak47_bullets_g", "0") // Rastro do Tiro - Color G
      cvar_bulletsblue  = register_cvar("zp_destroyer_ak47_bullets_b", "0")  // Rastro do Tiro - Color B
      cvar_zoom    = register_cvar("zp_destroyer_ak47_zoom",      "1")  // Zoom igual da AUG
      cvar_uclip    = register_cvar("zp_destroyer_ak47_unclip",    "0")  // Munição Infinita
      cvar_dmgmultiplier = register_cvar("zp_destroyer_ak47_dmgx",      "3.0") // Multiplicação de Dano
      cvar_red = register_cvar ("zp_destroyer_ak47_glow_R", "255")
      cvar_green = register_cvar ("zp_destroyer_ak47_glow_G", "255")
      cvar_blue = register_cvar ("zp_destroyer_ak47_glow_B", "255")

      register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
      RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1)
      register_event("DeathMsg", "Death", "a")

      register_event("CurWeapon","checkWeapon","be","1=1")
      register_event("WeapPickup","checkModel","b","1=19")
      register_event("CurWeapon", "make_tracer", "be", "1=1", "3>0")
      register_forward(FM_SetModel, "fw_SetModel")
      register_forward(FM_CmdStart, "fw_CmdStart")
      RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")
      RegisterHam(Ham_Item_AddToPlayer, g_Ent, "fw_AddToPlayer")
    }

    public client_connect(id)
    {
      g_Item[id] = false
      g_Bullets[id] = false
      g_Zoom[id] = false
    }

    public client_disconnect(id)
    {
      g_Item[id] = false
      g_Bullets[id] = false
      g_Zoom[id] = false
    }

    public event_round_start() 
    {
      for (new id = 1; id <= 32; id++)
      {
          if (!is_user_connected(id) || !is_user_alive(id))
            continue;

          if (g_Item[id])
          {
            g_Item[id] = false
            g_Bullets[id] = false
            g_Zoom[id] = false
          }
      }
    }

    public Death()
    {
      g_Item[read_data(2)] = false
      g_Bullets[read_data(2)] = false
      g_Zoom[read_data(2)] = false
    }

    public fwHamPlayerSpawnPost(id)
    {
      g_Item[id] = false
      g_Bullets[id] = false
      g_Zoom[id] = false
    }


    public fw_player_killed(victim, attacker, shouldgib)
    {
      if(g_Item[victim])
      {
          g_Item[victim] = false
          g_Bullets[victim] = false
          g_Zoom[victim] = false
      }
    }

    public zp_user_infected_post(infected, infector)
    {
      if (g_Item[infected])
      {
          g_Item[infected] = false
          g_Bullets[infected] = false
          g_Zoom[infected] = false
      }
    }

    public plugin_precache()
    {
      precache_model(VIEW_MODEL)
      precache_model(PLAYER_MODEL)
      precache_model(WORLD_MODEL)
      precache_sound("weapons/zoom.wav")
      m_spriteTexture = precache_model("sprites/dot.spr")
    }

    public za_extra_item_selected(player, itemid)
    {
      new player_name[32]
      get_user_name(player, player_name, charsmax(player_name))

      if (itemid == g_ItemID)
      {
          if(user_has_weapon(player, CSW_WEAPON))
          {
            drop_prim(player)
          }
          g_Item[player] = true

          strip_user_weapons(player)
          give_item(player, "weapon_knife")
          give_item(player, "weapon_deagle")
          give_item(player, "weapon_ak47")
          give_item(player, "ammo_762nato")
          fm_set_rendering(player, kRenderFxGlowShell, (cvar_red), (cvar_green), (cvar_blue), kRenderNormal, 16);

          ColorChat(player, GREEN, "[ZP]^1 Voce Comprou^3 %s", ITEM_NAME)
      }
    }

    public checkWeapon(id)
    {
      new plrClip, plrAmmo, plrWeap[32]
      new plrWeapId
      
      plrWeapId = get_user_weapon(id, plrClip , plrAmmo)
      
      if (plrWeapId == CSW_WEAPON && g_Item[id])
      {
          checkModel(id)
      }
      else 
      {
          return PLUGIN_CONTINUE
      }
      
      if (plrClip == 0 && get_pcvar_num(cvar_uclip))
      {
          get_weaponname(plrWeapId, plrWeap, 31)

          give_item(id, plrWeap)
          engclient_cmd(id, plrWeap) 
          engclient_cmd(id, plrWeap)
          engclient_cmd(id, plrWeap)
      }
      return PLUGIN_HANDLED
    }

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

      new szWeapID = read_data(2)

      if (szWeapID == CSW_WEAPON && g_Item[id] == true && get_pcvar_num(cvar_custommodel))
      {
          set_pev(id, pev_viewmodel2, VIEW_MODEL)
          set_pev(id, pev_weaponmodel2, PLAYER_MODEL)
      }
      return PLUGIN_HANDLED
    }

    public make_tracer(id)
    {
      if (get_pcvar_num(cvar_bullets))
      {
          new clip,ammo
          new wpnid = get_user_weapon(id,clip,ammo)
          new pteam[16]
          
          get_user_team(id, pteam, 15)
          
          if ((g_Bullets[id] > clip) && (wpnid == CSW_WEAPON) && g_Item[id])
          {
            new vec1[3], vec2[3]
            get_user_origin(id, vec1, 1)
            get_user_origin(id, vec2, 4)

            message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
            write_byte (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(get_pcvar_num(cvar_bulletsred))  // R [R G B]
            write_byte(get_pcvar_num(cvar_bulletsgreen)) // G [R G B]
            write_byte(get_pcvar_num(cvar_bulletsblue))  // B [R G B]
            write_byte(200) // brightness
            write_byte(150) // speed
            message_end()
          }
          g_Bullets[id] = clip
      }
    }

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

          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_WEAPON && g_Item[id] == true && !g_Zoom[id] == true)
            {
                g_Zoom[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_WEAPON && g_Item[id] == true && g_Zoom[id])
            {
                g_Zoom[id] = false
                cs_set_user_zoom(id, CS_RESET_ZOOM, 0)
            }
          }
      }
      return PLUGIN_HANDLED
    }

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

    public fw_SetModel(entity, model[])
    {
      if(!is_valid_ent(entity))
          return FMRES_IGNORED;

      if(!equal(model, OLDWORLD_MODEL)) 
          return FMRES_IGNORED;

      static szClassName[33]
      entity_get_string(entity, EV_SZ_classname, szClassName, charsmax(szClassName))

      if(!equal(szClassName, "weaponbox"))
          return FMRES_IGNORED

      static iOwner, iStoredGalilID
      iOwner = entity_get_edict(entity, EV_ENT_owner)
      iStoredGalilID = find_ent_by_owner(ENG_NULLENT, g_Ent, entity)

      if(g_Item[iOwner] && is_valid_ent(iStoredGalilID))
      {
          g_Item[iOwner] = false
          entity_set_int(iStoredGalilID, EV_INT_WEAPONKEY, WEAPONKEY)
          entity_set_model(entity, WORLD_MODEL)

          return FMRES_SUPERCEDE
      }
      return FMRES_IGNORED
    }

    public fw_AddToPlayer(AK47, id)
    {
      if(is_valid_ent(AK47) && is_user_connected(id) && entity_get_int(AK47, EV_INT_WEAPONKEY) == WEAPONKEY)
      {
          g_Item[id] = true
          entity_set_int(AK47, EV_INT_WEAPONKEY, 0)

          return HAM_HANDLED
      }
      return HAM_IGNORED
    }

    stock drop_prim(id) 
    {
      new weapons[32], num
      get_user_weapons(id, weapons, num)
      for (new i = 0; i < num; i++)
      {
          if (CSW_Weapon & (1<<weapons[i])) 
          {
            static wname[32]
            get_weaponname(weapons[i], wname, sizeof wname - 1)
            engclient_cmd(id, "drop", wname)
          }
      }
    }
    /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
    *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1031\\ f0\\ fs16 \n\\ par }
    */
    coloque a include zadmin la no seu compilador
    Lucas157
    Lucas157
    Humano


    Nick : Lucas CB
    Masculino Número de Mensagens : 182
    Ahah venham style zombie plague 4.3 add skype lucas.cb5
    Ammo Packs : 4135
    Honra : -7
    Data de inscrição : 30/08/2013

    [Plugin] /am (Extra Items Para Adm) Empty Re: [Plugin] /am (Extra Items Para Adm)

    Mensagem por Lucas157 9/10/2013, 5:37 pm

    NUUS MANO VLW QUANDO FUI VER AS INCLUDE NAO TINHA ZM_VIP E ZM_ADMIN VALEW POR LEMBRAR
    cabelozl
    cabelozl
    Humano


    Masculino Número de Mensagens : 44
    Ammo Packs : 4079
    Honra : 3
    Data de inscrição : 30/09/2013

    [Plugin] /am (Extra Items Para Adm) Empty Re: [Plugin] /am (Extra Items Para Adm)

    Mensagem por cabelozl 9/10/2013, 5:38 pm

    Lucas157 escreveu:NUUS MANO VLW QUANDO FUI VER AS INCLUDE NAO TINHA ZM_VIP E ZM_ADMIN VALEW POR LEMBRAR
    de boas kk
    S4MuR41
    S4MuR41
    Humano


    Nick : TK | FreeKiLL
    Masculino Número de Mensagens : 102
    Dormindo
    Ammo Packs : 4470
    Honra : 10
    Data de inscrição : 08/10/2012

    [Plugin] /am (Extra Items Para Adm) Empty Re: [Plugin] /am (Extra Items Para Adm)

    Mensagem por S4MuR41 9/10/2013, 5:57 pm

    Ehehehe
    MtsLa!<3.L
    MtsLa!<3.L
    Moderador
    Moderador


    Nick : Estelionatario
    Masculino Número de Mensagens : 1237
    InfoBanker
    Ammo Packs : 4774
    Honra : 28
    Data de inscrição : 16/03/2013

    [Plugin] /am (Extra Items Para Adm) Empty Re: [Plugin] /am (Extra Items Para Adm)

    Mensagem por MtsLa!<3.L 9/10/2013, 6:13 pm

    Otimo plugin Perfect so nao dou rep+ porque ja dei um rep+ hj
    micael mattei
    micael mattei
    Humano


    Nick : -BO4MORT3-
    Masculino Número de Mensagens : 229
    [ZP] - The Dark Division
    Ammo Packs : 4036
    Honra : 0
    Data de inscrição : 14/11/2013

    [Plugin] /am (Extra Items Para Adm) Empty Re: [Plugin] /am (Extra Items Para Adm)

    Mensagem por micael mattei 10/4/2014, 3:44 am

    Muito massa. Parabéns, ótimo plugin.

    Conteúdo patrocinado


    [Plugin] /am (Extra Items Para Adm) Empty Re: [Plugin] /am (Extra Items Para Adm)

    Mensagem por Conteúdo patrocinado


      Data/hora atual: 26/11/2024, 11:04 pm