Zumbis Online
Últimos assuntos
» [AJUDA] Banco
por Pro B R 3 G 4 Hoje à(s) 9:01 am

» Boss Firemonster
por Pro B R 3 G 4 6/1/2017, 2:09 pm

» [PROBLEMA] ADM
por Pro B R 3 G 4 5/1/2017, 3:34 pm

» NOVO IP Zombie -> 177.54.146.191:27016
por zumbmod 5/1/2017, 3:15 pm

» [AJUDA] Mod Berserker
por Pro B R 3 G 4 3/1/2017, 10:00 am

» Vendo /vencimento Privado!
por william 2/1/2017, 9:49 pm

» [AJUDA] Zp 4.3 Fix5a
por zumbmod 2/1/2017, 2:20 pm

» [PEDIDO] ZP Da DarkHunters
por [P]erfec[T] [S]cr[@]s[H] 1/1/2017, 12:29 pm

» Addons: Dark Plagues 5.0.8
por bruno2016 1/1/2017, 10:38 am

» Sistema de /Party
por zumbmod 31/12/2016, 10:52 am

Frases filosóficas Zplague:
....
Os membros mais ativos da semana
Pro B R 3 G 4
 

Adsense

[Plugin] /am (Extra Items Para Adm)

Ver o tópico anterior Ver o tópico seguinte Ir em baixo

[Plugin] /am (Extra Items Para Adm)

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

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

Link: 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, 1:31 pm, editado 1 vez(es) (Razão : Corrigindo o erro.)

____________________________________________


Dicas Para Ser um Bom Scripter:
* Pense no Plugin que ira criar (Seja Inovador)
* Crie um código SMA imaginário na cabeça de como vai ser o plugin
* Passe o Codigo mental para o AMX Studio
* Compile e Teste
* Corrija Todos os Bugs do Plugin (Caso tiver um)
* Poste o Plugin ;)

** Seguindo as Dicas você estara no Padrão [P]erfec[T] [S]cr[@]s[H] **  
Zplague24 Zplague20Zplague12 

[P]erfec[T] [S]cr[@]s[H]
Scripter
Scripter

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

Ver perfil do usuário http://www.steamcommunity.com/id/perfectscrash perfect.scrash

Voltar ao Topo Ir em baixo

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

Mensagem por cabelozl em 9/10/2013, 1: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: 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, 1:19 pm, editado 1 vez(es)

cabelozl
Humano
Humano

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

Ver perfil do usuário

Voltar ao Topo Ir em baixo

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

Mensagem por Lucas157 em 9/10/2013, 1: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

____________________________________________


Lucas Gabriel




Ajudei + REP 
Skype Lucas.cb5:

Lucas157
Humano
Humano

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

Ver perfil do usuário lucas.cb5

Voltar ao Topo Ir em baixo

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

Mensagem por cabelozl em 9/10/2013, 1: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
Humano
Humano

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

Ver perfil do usuário

Voltar ao Topo Ir em baixo

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

Mensagem por cabelozl em 9/10/2013, 1:25 pm

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

cabelozl
Humano
Humano

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

Ver perfil do usuário

Voltar ao Topo Ir em baixo

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

Mensagem por Lucas157 em 9/10/2013, 1: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

____________________________________________


Lucas Gabriel




Ajudei + REP 
Skype Lucas.cb5:

Lucas157
Humano
Humano

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

Ver perfil do usuário lucas.cb5

Voltar ao Topo Ir em baixo

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

Mensagem por cabelozl em 9/10/2013, 1: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 .......

cabelozl
Humano
Humano

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

Ver perfil do usuário

Voltar ao Topo Ir em baixo

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

Mensagem por [P]erfec[T] [S]cr[@]s[H] em 9/10/2013, 1: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)
      }
  }
}

____________________________________________


Dicas Para Ser um Bom Scripter:
* Pense no Plugin que ira criar (Seja Inovador)
* Crie um código SMA imaginário na cabeça de como vai ser o plugin
* Passe o Codigo mental para o AMX Studio
* Compile e Teste
* Corrija Todos os Bugs do Plugin (Caso tiver um)
* Poste o Plugin ;)

** Seguindo as Dicas você estara no Padrão [P]erfec[T] [S]cr[@]s[H] **  
Zplague24 Zplague20Zplague12 

[P]erfec[T] [S]cr[@]s[H]
Scripter
Scripter

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

Ver perfil do usuário http://www.steamcommunity.com/id/perfectscrash perfect.scrash

Voltar ao Topo Ir em baixo

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

Mensagem por Lucas157 em 9/10/2013, 1:34 pm

Erro :p

____________________________________________


Lucas Gabriel




Ajudei + REP 
Skype Lucas.cb5:

Lucas157
Humano
Humano

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

Ver perfil do usuário lucas.cb5

Voltar ao Topo Ir em baixo

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

Mensagem por cabelozl em 9/10/2013, 1: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

cabelozl
Humano
Humano

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

Ver perfil do usuário

Voltar ao Topo Ir em baixo

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

Mensagem por Lucas157 em 9/10/2013, 1:37 pm

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

____________________________________________


Lucas Gabriel




Ajudei + REP 
Skype Lucas.cb5:

Lucas157
Humano
Humano

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

Ver perfil do usuário lucas.cb5

Voltar ao Topo Ir em baixo

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

Mensagem por cabelozl em 9/10/2013, 1: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

cabelozl
Humano
Humano

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

Ver perfil do usuário

Voltar ao Topo Ir em baixo

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

Mensagem por S4MuR41 em 9/10/2013, 1:57 pm

Ehehehe

____________________________________________

.            .     

S4MuR41
Humano
Humano

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

Ver perfil do usuário mercenario.gabriel

Voltar ao Topo Ir em baixo

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

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

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

____________________________________________

Quem sabe faz ao vivo :)
-----------------------------------------
Salve - Leozinho - Hawk - Gkf - Junin - J0sh - Rotam
-----------------------------------------
Vem que com nois é vida HAHA!!!!

-----------------------------------------

MtsLa!<3.L
Moderador
Moderador

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

Ver perfil do usuário

Voltar ao Topo Ir em baixo

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

Mensagem por micael mattei em 9/4/2014, 11:44 pm

Muito massa. Parabéns, ótimo plugin.

____________________________________________


micael mattei
Humano
Humano

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

Ver perfil do usuário http://steamcommunity.com/profiles/76561198073643303 micaelmattei

Voltar ao Topo Ir em baixo

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

Mensagem por Conteúdo patrocinado Hoje à(s) 7:18 pm


Conteúdo patrocinado


Voltar ao Topo Ir em baixo

Ver o tópico anterior Ver o tópico seguinte Voltar ao Topo

- Tópicos similares

 
Permissão deste fórum:
Você não pode responder aos tópicos neste fórum