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

Zplague Entrar

Seu portal de Zombie Plague no Brasil


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

more_horiz
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.)

description[Plugin] /am (Extra Items Para Adm) EmptyRe: [Plugin] /am (Extra Items Para Adm)

more_horiz
[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)

description[Plugin] /am (Extra Items Para Adm) EmptyRe: [Plugin] /am (Extra Items Para Adm)

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

description[Plugin] /am (Extra Items Para Adm) EmptyRe: [Plugin] /am (Extra Items Para Adm)

more_horiz
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

description[Plugin] /am (Extra Items Para Adm) EmptyRe: [Plugin] /am (Extra Items Para Adm)

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

description[Plugin] /am (Extra Items Para Adm) EmptyRe: [Plugin] /am (Extra Items Para Adm)

more_horiz

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

description[Plugin] /am (Extra Items Para Adm) EmptyRe: [Plugin] /am (Extra Items Para Adm)

more_horiz
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 .......

description[Plugin] /am (Extra Items Para Adm) EmptyRe: [Plugin] /am (Extra Items Para Adm)

more_horiz
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)
      }
  }
}

description[Plugin] /am (Extra Items Para Adm) EmptyRe: [Plugin] /am (Extra Items Para Adm)

more_horiz
Erro :p

description[Plugin] /am (Extra Items Para Adm) EmptyRe: [Plugin] /am (Extra Items Para Adm)

more_horiz
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

description[Plugin] /am (Extra Items Para Adm) EmptyRe: [Plugin] /am (Extra Items Para Adm)

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

description[Plugin] /am (Extra Items Para Adm) EmptyRe: [Plugin] /am (Extra Items Para Adm)

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

description[Plugin] /am (Extra Items Para Adm) EmptyRe: [Plugin] /am (Extra Items Para Adm)

more_horiz
Ehehehe

description[Plugin] /am (Extra Items Para Adm) EmptyRe: [Plugin] /am (Extra Items Para Adm)

more_horiz
Otimo plugin Perfect so nao dou rep+ porque ja dei um rep+ hj

description[Plugin] /am (Extra Items Para Adm) EmptyRe: [Plugin] /am (Extra Items Para Adm)

more_horiz
Muito massa. Parabéns, ótimo plugin.

description[Plugin] /am (Extra Items Para Adm) EmptyRe: [Plugin] /am (Extra Items Para Adm)

more_horiz
privacy_tip Permissões neste sub-fórum
Não podes responder a tópicos
power_settings_newInicie sessão para responder