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[PEDIDO] Itens Extras [AK-47 DESTROYER] [ZOMBIE PLAGUE 4.3] Empty[PEDIDO] Itens Extras [AK-47 DESTROYER] [ZOMBIE PLAGUE 4.3]

more_horiz
Quero uma AK-47 Destroyer , com o GLOW BRANCO = KIT DAMAGE e TIROS DE COR VERMELHA !

POIS NO TOPICO ANTERIOR ESTA SEM GLOW E LINK OFF !

PASSE A .SMA

PRINT 1 :

[PEDIDO] Itens Extras [AK-47 DESTROYER] [ZOMBIE PLAGUE 4.3] ZriYS

PRINT 2 :

[PEDIDO] Itens Extras [AK-47 DESTROYER] [ZOMBIE PLAGUE 4.3] Sulr8

description[PEDIDO] Itens Extras [AK-47 DESTROYER] [ZOMBIE PLAGUE 4.3] EmptyRe: [PEDIDO] Itens Extras [AK-47 DESTROYER] [ZOMBIE PLAGUE 4.3]

more_horiz
Veja se e esse aqui.

Código:

#include <amxmodx>
#include <cstrike>
#include <engine>
#include <fakemeta>
#include <fakemeta_util>
#include < fun >
#include <hamsandwich>
#include <zombieplague>
#include <ColorChat>

#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/v_ak47.mdl" // Model Personalizado
new PLAYER_MODEL[]  = "models/p_ak47.mdl" // Model Personalizado
new WORLD_MODEL[]    = "models/w_ak47.mdl" // Model Personalizado
new OLDWORLD_MODEL[] = "models/w_ak47.mdl" // Model Original

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

   g_ItemID = zp_register_extra_item(ITEM_NAME, ITEM_COST, ZP_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",      "5.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 zp_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[PEDIDO] Itens Extras [AK-47 DESTROYER] [ZOMBIE PLAGUE 4.3] EmptyRe: [PEDIDO] Itens Extras [AK-47 DESTROYER] [ZOMBIE PLAGUE 4.3]

more_horiz
é igual dos prints ?

a cor e tiro vermelho?

description[PEDIDO] Itens Extras [AK-47 DESTROYER] [ZOMBIE PLAGUE 4.3] EmptyRe: [PEDIDO] Itens Extras [AK-47 DESTROYER] [ZOMBIE PLAGUE 4.3]

more_horiz
Testa ai cara mais acho que ta igual sim a glow e branca e o rastro da bala e vermelho

description[PEDIDO] Itens Extras [AK-47 DESTROYER] [ZOMBIE PLAGUE 4.3] EmptyRe: [PEDIDO] Itens Extras [AK-47 DESTROYER] [ZOMBIE PLAGUE 4.3]

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