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] Arma Goldens Empty[PEDIDO] Arma Goldens

more_horiz
Alguem poderia me passar a ak e a colt golden q nao evoluem junto com a carabine

obs: Colt golden para vip


obrigado!!!

description[PEDIDO] Arma Goldens EmptyRe: [PEDIDO] Arma Goldens

more_horiz
Use estas Thunders/Carabines que não bugam.

Thunder/Carabine M4A1

Código:

 
#include <amxmodx >
#include <engine >
#include <zombieplague >
#include <hamsandwich >

#define PLUGIN "[ZP] Sub-Plugin: Thunder M4a1"
#define VERSION "2.5"
#define AUTHOR "Beuller"

new v_thunder_m4a1[]="models/zombie_plague/v_thunder_m4a1.mdl"
new const p_thunder_m4a1[] = "models/zombie_plague/p_thunder_m4a1.mdl"

new bool:g_Thunder_M4A1[33]

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

    register_event("DeathMsg", "DeathMsg", "a")
    register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
    register_event("CurWeapon", "event_CurWeapon", "be", "1=1")

    RegisterHam(Ham_Spawn, "player", "ham_PlayerSpawn_Post", 1)
    RegisterHam(Ham_Killed, "player", "fw_PlayerKilled")
}

public plugin_precache()
{
    precache_model(v_thunder_m4a1)
    precache_model(p_thunder_m4a1)
}

public client_connect(id)
{
    g_Thunder_M4A1[id] = false
}
   
public client_disconnect(id)
{
    g_Thunder_M4A1[id] = false
}

public DeathMsg()
{
    new i = read_data(1)
   
    if(get_user_weapon(i) == CSW_M4A1)
    {
        set_model(i)
    }
}

public zp_user_infected_post(infected, infector)
{
    if (g_Thunder_M4A1[infected])
    {
        g_Thunder_M4A1[infected] = false
    }
}

public fw_PlayerKilled(victim, attacker, shouldgib)
{
    g_Thunder_M4A1[victim] = false
}

public ham_PlayerSpawn_Post(id)
{
    g_Thunder_M4A1[id] = false
   
    return PLUGIN_CONTINUE
}

public event_round_start()
{
    for (new i = 1; i <= 32; i++)
    {
        g_Thunder_M4A1[i] = false
    }
}

public event_CurWeapon(id)
{
    new weapid = read_data(2)
   
    if(!is_user_alive(id))
        return;
   
    if(g_Thunder_M4A1[id] && weapid == CSW_M4A1)
    {
        entity_set_string(id, EV_SZ_viewmodel, v_thunder_m4a1)
        entity_set_string(id, EV_SZ_weaponmodel, p_thunder_m4a1)
    }
}

public set_model(id)
{
    g_Thunder_M4A1[id] = true
}


Thunder/Carabine AK47

Código:


#include <amxmodx >
#include <engine >
#include <zombieplague >
#include <hamsandwich >

#define PLUGIN "[ZP] Sub-Plugin: Thunder AK47"
#define VERSION "2.5"
#define AUTHOR "Beuller"

new v_thunder_ak47[]="models/zombie_plague/v_thunder_ak47.mdl"
new const p_thunder_ak47[] = "models/zombie_plague/p_thunder_ak47.mdl"

new bool:g_Thunder_AK47[33]

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

    register_event("DeathMsg", "DeathMsg", "a")
    register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
    register_event("CurWeapon", "event_CurWeapon", "be", "1=1")

    RegisterHam(Ham_Spawn, "player", "ham_PlayerSpawn_Post", 1)
    RegisterHam(Ham_Killed, "player", "fw_PlayerKilled")
}

public plugin_precache()
{
    precache_model(v_thunder_ak47)
    precache_model(p_thunder_ak47)
}

public client_connect(id)
{
    g_Thunder_AK47[id] = false
}
   
public client_disconnect(id)
{
    g_Thunder_AK47[id] = false
}

public DeathMsg()
{
    new i = read_data(1)
   
    if(get_user_weapon(i) == CSW_AK47)
    {
        set_model(i)
    }
}

public zp_user_infected_post(infected, infector)
{
    if (g_Thunder_AK47[infected])
    {
        g_Thunder_AK47[infected] = false
    }
}

public fw_PlayerKilled(victim, attacker, shouldgib)
{
    g_Thunder_AK47[victim] = false
}

public ham_PlayerSpawn_Post(id)
{
    g_Thunder_AK47[id] = false
   
    return PLUGIN_CONTINUE
}

public event_round_start()
{
    for (new i = 1; i <= 32; i++)
    {
        g_Thunder_AK47[i] = false
    }
}

public event_CurWeapon(id)
{
    new weapid = read_data(2)
   
    if(!is_user_alive(id))
        return;
   
    if(g_Thunder_AK47[id] && weapid == CSW_AK47)
    {
        entity_set_string(id, EV_SZ_viewmodel, v_thunder_ak47)
        entity_set_string(id, EV_SZ_weaponmodel, p_thunder_ak47)
    }
}

public set_model(id)
{
    g_Thunder_AK47[id] = true
}

description[PEDIDO] Arma Goldens EmptyRe: [PEDIDO] Arma Goldens

more_horiz
kra vlw vc ajudoo muitoo!!!

@edit

Pow Voltou A Upar A Colt Golden E Ak Golden, e a colt prata tbm

smas:

AK GOlden

Código:

[ZP] Extra Item: Golden Ak 47
Team: Humans

Description: This plugin adds a new weapon for Human Teams.
Weapon Cost: 30

Features:
- This weapon do more damage
- This weapon has zoom
- Launch Lasers
- This weapon has unlimited bullets

Credits:

KaOs - For his Dual MP5 mod

Cvars:


- zp_goldenak_dmg_multiplier <5> - Damage Multiplier for Golden Ak 47
- zp_goldenak_gold_bullets <1|0> - Golden bullets effect ?
- zp_goldenak_custom_model <1|0> - Golden ak Custom Model
- zp_goldenak_unlimited_clip <1|0> - Golden ak Unlimited Clip

*/



#include <  amxmodx >
#include <  fakemeta >
#include <  fun >
#include <  hamsandwich >
#include <  cstrike >
#include <  zombieplague >

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

new AK_V_MODEL[64] = "models/zombie_plague/v_golden_ak47.mdl"
new AK_P_MODEL[64] = "models/zombie_plague/p_golden_ak47.mdl"

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

// Item ID
new g_itemid

new bool:g_HasAk[33]

new g_hasZoom[ 33 ]
new bullets[ 33 ]

// Sprite
new m_spriteTexture

const Wep_ak47 = ((1<<CSW_AK47))

public plugin_init()
{
   
   /* CVARS */
   cvar_dmgmultiplier = register_cvar("zp_goldenak_dmg_multiplier", "5")
   cvar_custommodel = register_cvar("zp_goldenak_custom_model", "1")
   cvar_goldbullets = register_cvar("zp_goldenak_gold_bullets", "1")
   cvar_uclip = register_cvar("zp_goldenak_unlimited_clip", "1")
   
   // Register The Plugin
   register_plugin("[ZP] Extra: Golden Ak 47", "1.1", "AlejandroSk")
   // Register Zombie Plague extra item
   g_itemid = zp_register_extra_item("Golden Ak 47", 60, ZP_TEAM_HUMAN)
   // Death Msg
   register_event("DeathMsg", "Death", "a")
   // Weapon Pick Up
   register_event("WeapPickup","checkModel","b","1=19")
   // Current Weapon Event
   register_event("CurWeapon","checkWeapon","be","1=1")
   register_event("CurWeapon", "make_tracer", "be", "1=1", "3>0")
   // Ham TakeDamage
   RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")
   register_forward( FM_CmdStart, "fw_CmdStart" )
   RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1)
   
}

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

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

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

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

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

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

public checkModel(id)
{
   if ( zp_get_user_zombie(id) )
      return PLUGIN_HANDLED
   
   new szWeapID = read_data(2)
   
   if ( szWeapID == CSW_AK47 && g_HasAk[id] == true && get_pcvar_num(cvar_custommodel) )
   {
      set_pev(id, pev_viewmodel2, AK_V_MODEL)
      set_pev(id, pev_weaponmodel2, AK_P_MODEL)
   }
   return PLUGIN_HANDLED
}

public checkWeapon(id)
{
   new plrClip, plrAmmo, plrWeap[32]
   new plrWeapId
   
   plrWeapId = get_user_weapon(id, plrClip , plrAmmo)
   
   if (plrWeapId == CSW_AK47 && g_HasAk[id])
   {
      checkModel(id)
   }
   else
   {
      return PLUGIN_CONTINUE
   }
   
   if (plrClip == 0 && get_pcvar_num(cvar_uclip))
   {
      // If the user is out of ammo..
      get_weaponname(plrWeapId, plrWeap, 31)
      // Get the name of their weapon
      give_item(id, plrWeap)
      engclient_cmd(id, plrWeap)
      engclient_cmd(id, plrWeap)
      engclient_cmd(id, plrWeap)
   }
   return PLUGIN_HANDLED
}



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

public fw_CmdStart( id, uc_handle, seed )
{
   if( !is_user_alive( id ) )
      return PLUGIN_HANDLED
   
   if( ( get_uc( uc_handle, UC_Buttons ) & IN_ATTACK2 ) && !( pev( id, pev_oldbuttons ) & IN_ATTACK2 ) )
   {
      new szClip, szAmmo
      new szWeapID = get_user_weapon( id, szClip, szAmmo )
      
      if( szWeapID == CSW_AK47 && g_HasAk[id] == true && !g_hasZoom[id] == true)
      {
         g_hasZoom[id] = true
         cs_set_user_zoom( id, CS_SET_AUGSG552_ZOOM, 0 )
         emit_sound( id, CHAN_ITEM, "weapons/zoom.wav", 0.20, 2.40, 0, 100 )
      }
      
      else if ( szWeapID == CSW_AK47 && g_HasAk[id] == true && g_hasZoom[id])
      {
         g_hasZoom[ id ] = false
         cs_set_user_zoom( id, CS_RESET_ZOOM, 0 )
         
      }
      
   }
   return PLUGIN_HANDLED
}


public make_tracer(id)
{
   if (get_pcvar_num(cvar_goldbullets))
   {
      new clip,ammo
      new wpnid = get_user_weapon(id,clip,ammo)
      new pteam[16]
      
      get_user_team(id, pteam, 15)
      
      if ((bullets[id] > clip) && (wpnid == CSW_AK47) && g_HasAk[id])
      {
         new vec1[3], vec2[3]
         get_user_origin(id, vec1, 1) // origin; your camera point.
         get_user_origin(id, vec2, 4) // termina; where your bullet goes (4 is cs-only)
         
         
         //BEAMENTPOINTS
         message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
         write_byte (0)    //TE_BEAMENTPOINTS 0
         write_coord(vec1[0])
         write_coord(vec1[1])
         write_coord(vec1[2])
         write_coord(vec2[0])
         write_coord(vec2[1])
         write_coord(vec2[2])
         write_short( m_spriteTexture )
         write_byte(1) // framestart
         write_byte(5) // framerate
         write_byte(2) // life
         write_byte(10) // width
         write_byte(0) // noise
         write_byte( 255 )    // r, g, b
         write_byte( 215 )      // r, g, b
         write_byte( 0 )      // r, g, b
         write_byte(200) // brightness
         write_byte(150) // speed
         message_end()
      }
   
      bullets[id] = clip
   }
   
}

public zp_extra_item_selected(player, itemid)
{
   if ( itemid == g_itemid )
   {
      if ( user_has_weapon(player, CSW_AK47) )
      {
         drop_prim(player)
      }
      
      give_item(player, "weapon_ak47")
      client_print(player, print_chat, "[ZP] You bought Golden Ak - 47")
      g_HasAk[player] = true;
   }
}

stock drop_prim(id)
{
   new weapons[32], num
   get_user_weapons(id, weapons, num)
   for (new i = 0; i < num; i++) {
      if (Wep_ak47 & (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\\ lang1034\\ f0\\ fs16 \n\\ par }
*/



Colt Prata

Código:

//[WEGN] Extra Item: Silver M4A1
//Team: Humans
//Copyrights 2009, Shuttle_Wave
//--------------------------------------
//Coded For Waves Extreme Gaming Network
//--------------------------------------
//------------------------
//www.waves-gaming.info
//------------------------
//THIS MOD IS CURRENTLY USE IN [WEGN] Waves Extreme Gaming Network ZOMBIE-PLAGUE
///////////////////////
// Credits THANKS //
///////////////////////
//Exolent[jNr] : Helping with Silver Bullets and few bugs.
//AlejandroSk : Orginal Golden AK47 Script
//Alex Kim (Shadow_Wave) : Tester
////////////////// 
//Cvars: //
//////////////////
//- zp_silverm4_dmg_multiplier <5> - Damage Multiplier for Silver M4A1
//- zp_silverm4_silver_bullets <1|0> - Silver bullets effect ?
//- zp_silverm4_custom_model <1|0> - M4A1 Custom Model
//- zp_silverm4_unlimited_clip <1|0> - M4A1 Unlimited Clip 
//*/
///////////////////
// Includes //
///////////////////
#include <  amxmodx >
#include <  fakemeta >
#include <  fun >
#include <  hamsandwich >
#include <  cstrike >
#include <  zombieplague >
/////////////////
//Define //
/////////////////
#define is_valid_player(%1) (1 <= %1 <= 32)
///////////////////////////////////////////////////
// ADD OUR OWN CUSTOM SILVER M4A1 MODELS HERE //
///////////////////////////////////////////////////
new M4A1_V_MODEL[64] = "models/v_silver_m4a1.mdl"
new M4A1_P_MODEL[64] = "models/p_silver_m4a1.mdl"
/* Pcvars */
new cvar_dmgmultiplier, cvar_silverbullets, cvar_custommodel, cvar_uclip
// Item ID
new g_itemid
new bool:g_HasM4A1[33]
new g_hasZoom[ 33 ]
new bullets[ 33 ]
// Sprite
new m_spriteTexture
const Wep_m4a1 = ((1<<CSW_M4A1))
public plugin_init()
{
 
/* CVARS */
cvar_dmgmultiplier = register_cvar("zp_silverm4_dmg_multiplier", "3")
cvar_custommodel = register_cvar("zp_silverm4_custom_model", "1")
cvar_silverbullets = register_cvar("zp_silverm4_silver_bullets", "1")
cvar_uclip = register_cvar("zp_silverm4_unlimited_clip", "0")
 
// Register The Plugin
register_plugin("[WEGN] Extra: Silver M4A1", "2.0", "Shuttle_Wave")
// Register Zombie Plague extra item
g_itemid = zp_register_extra_item("Silver M4A1", 40, ZP_TEAM_HUMAN)
// Death Msg
register_event("DeathMsg", "Death", "a")
// Weapon Pick Up
register_event("WeapPickup","checkModel","b","1=19")
// Current Weapon Event
register_event("CurWeapon","checkWeapon","be","1=1")
register_event("CurWeapon", "make_tracer", "be", "1=1", "3>0")
// Ham TakeDamage
RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")
register_forward( FM_CmdStart, "fw_CmdStart" )
RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1)
 
}
public client_connect(id)
{
g_HasM4A1[id] = false
}
public client_disconnect(id)
{
g_HasM4A1[id] = false
}
public Death()
{
g_HasM4A1[read_data(2)] = false
}
public fwHamPlayerSpawnPost(id)
{
g_HasM4A1[id] = false
}
public plugin_precache()
{
precache_model(M4A1_V_MODEL)
precache_model(M4A1_P_MODEL)
m_spriteTexture = precache_model("sprites/dot.spr")
precache_sound("weapons/zoom.wav")
}
public zp_user_infected_post(id)
{
if (zp_get_user_zombie(id))
{
g_HasM4A1[id] = false
}
}
public checkModel(id)
{
if ( zp_get_user_zombie(id) )
return PLUGIN_HANDLED
 
new szWeapID = read_data(2)
 
if ( szWeapID == CSW_M4A1 && g_HasM4A1[id] == true && get_pcvar_num(cvar_custommodel) )
{
set_pev(id, pev_viewmodel2, M4A1_V_MODEL)
set_pev(id, pev_weaponmodel2, M4A1_P_MODEL)
}
return PLUGIN_HANDLED
}
public checkWeapon(id)
{
new plrClip, plrAmmo, plrWeap[32]
new plrWeapId
 
plrWeapId = get_user_weapon(id, plrClip , plrAmmo)
 
if (plrWeapId == CSW_M4A1 && g_HasM4A1[id])
{
checkModel(id)
}
else 
{
return PLUGIN_CONTINUE
}
 
if (plrClip == 0 && get_pcvar_num(cvar_uclip))
{
// If the user is out of ammo..
get_weaponname(plrWeapId, plrWeap, 31)
// Get the name of their weapon
give_item(id, plrWeap)
engclient_cmd(id, plrWeap) 
engclient_cmd(id, plrWeap)
engclient_cmd(id, plrWeap)
}
return PLUGIN_HANDLED
}
 
public fw_TakeDamage(victim, inflictor, attacker, Float:damage)
{
if ( is_valid_player( attacker ) && get_user_weapon(attacker) == CSW_M4A1 && g_HasM4A1[attacker] )
{
SetHamParamFloat(4, damage * get_pcvar_float( cvar_dmgmultiplier ) )
}
}
public fw_CmdStart( id, uc_handle, seed )
{
if( !is_user_alive( id ) ) 
return PLUGIN_HANDLED
 
if( ( get_uc( uc_handle, UC_Buttons ) & IN_ATTACK2 ) && !( pev( id, pev_oldbuttons ) & IN_ATTACK2 ) )
{
new szClip, szAmmo
new szWeapID = get_user_weapon( id, szClip, szAmmo )
 
if( szWeapID == CSW_M4A1 && g_HasM4A1[id] == true && !g_hasZoom[id] == true)
{
g_hasZoom[id] = true
cs_set_user_zoom( id, CS_SET_AUGSG552_ZOOM, 0 )
emit_sound( id, CHAN_ITEM, "weapons/zoom.wav", 0.20, 2.40, 0, 100 )
}
 
else if ( szWeapID == CSW_M4A1 && g_HasM4A1[id] == true && g_hasZoom[id])
{
g_hasZoom[ id ] = false
cs_set_user_zoom( id, CS_RESET_ZOOM, 0 )
 
}
 
}
return PLUGIN_HANDLED
}
public make_tracer(id)
{
if (get_pcvar_num(cvar_silverbullets))
{
new clip,ammo
new wpnid = get_user_weapon(id,clip,ammo)
new pteam[16]
 
get_user_team(id, pteam, 15)
 
if ((bullets[id] > clip) && (wpnid == CSW_M4A1) && g_HasM4A1[id]) 
{
new vec1[3], vec2[3]
get_user_origin(id, vec1, 1) // origin; your camera point.
get_user_origin(id, vec2, 4) // termina; where your bullet goes (4 is cs-only)
 
 
//BEAMENTPOINTS
message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
write_byte (0) //TE_BEAMENTPOINTS 0
write_coord(vec1[0])
write_coord(vec1[1])
write_coord(vec1[2])
write_coord(vec2[0])
write_coord(vec2[1])
write_coord(vec2[2])
write_short( m_spriteTexture )
write_byte(1) // framestart
write_byte(5) // framerate
write_byte(2) // life
write_byte(10) // width
write_byte(0) // noise
write_byte( 255 ) // r, g, b
write_byte( 255 ) // r, g, b
write_byte( 255 ) // r, g, b 
write_byte(200) // brightness
write_byte(150) // speed
message_end()
}
 
bullets[id] = clip
}
 
}
public zp_extra_item_selected(player, itemid)
{
if ( itemid == g_itemid )
{
if ( user_has_weapon(player, CSW_M4A1) )
{
drop_prim(player)
}
 
give_item(player, "weapon_m4a1")
client_print(player, print_chat, "[WEGN] You bought Silver M4A1 Multiply(x2)")
g_HasM4A1[player] = true;
}
}
stock drop_prim(id) 
{
new weapons[32], num
get_user_weapons(id, weapons, num)
for (new i = 0; i < num; i++) {
if (Wep_m4a1 & (1<<weapons[i])) 
{
static wname[32]
get_weaponname(weapons[i], wname, sizeof wname - 1)
engclient_cmd(id, "drop", wname)
}
}
}
/* Shuttle_Wave Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1034\\ f0\\ fs16 \n\\ par }
*/ 



Colt Golden


Código:

#include <    amxmodx >
#include <    fakemeta >
#include <    fun >
#include <    hamsandwich >
#include <    cstrike >
#include <    zombieplague >
#include <    zmvip >

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

new M4_V_MODEL[64] = "models/zombie_plague/v_golden_m4a1_UP.mdl"
new M4_P_MODEL[64] = "models/zombie_plague/p_golden_m4a1_UP.mdl"

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

// Item ID
new g_itemid

new bool:g_HasM4[33]

new g_hasZoom[ 33 ]
new bullets[ 33 ]

// Sprite
new m_spriteTexture

const Wep_m4a1 = ((1<<CSW_M4A1))

public plugin_init()
{
 
  /* CVARS */
  cvar_dmgmultiplier = register_cvar("zp_goldenm4_dmg_multiplier", "14")
  cvar_custommodel = register_cvar("zp_goldenm4_custom_model", "1")
  cvar_goldbullets = register_cvar("zp_goldenm4_gold_bullets", "1")
  cvar_uclip = register_cvar("zp_goldenm4_unlimited_clip", "1")
 
  // Register The Plugin
  register_plugin("[ZP] Extra: Golden M4A1", "1.1", "Bill=Thailand=[UP]")
  // Register Zombie Plague extra item
  g_itemid = zv_register_extra_item("Golden M4A1", "´[1 Round]", 50, ZV_TEAM_HUMAN)
  // Death Msg
  register_event("DeathMsg", "Death", "a")
  // Weapon Pick Up
  register_event("WeapPickup","checkModel","b","1=19")
  // Current Weapon Event
  register_event("CurWeapon","checkWeapon","be","1=1")
  register_event("CurWeapon", "make_tracer", "be", "1=1", "3>0")
  // Ham TakeDamage
  RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")
  register_forward( FM_CmdStart, "fw_CmdStart" )
  RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1)
 
}

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

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

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

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

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

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

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

public checkWeapon(id)
{
  new plrClip, plrAmmo, plrWeap[32]
  new plrWeapId
 
  plrWeapId = get_user_weapon(id, plrClip , plrAmmo)
 
  if (plrWeapId == CSW_M4A1 && g_HasM4[id])
  {
      checkModel(id)
  }
  else
  {
      return PLUGIN_CONTINUE
  }
 
  if (plrClip == 0 && get_pcvar_num(cvar_uclip))
  {
      // If the user is out of ammo..
      get_weaponname(plrWeapId, plrWeap, 31)
      // Get the name of their weapon
      give_item(id, plrWeap)
      engclient_cmd(id, plrWeap)
      engclient_cmd(id, plrWeap)
      engclient_cmd(id, plrWeap)
  }
  return PLUGIN_HANDLED
}



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

public fw_CmdStart( id, uc_handle, seed )
{
  if( !is_user_alive( id ) )
      return PLUGIN_HANDLED
 
  if( ( get_uc( uc_handle, UC_Buttons ) & IN_ATTACK2 ) && !( pev( id, pev_oldbuttons ) & IN_ATTACK2 ) )
  {
      new szClip, szAmmo
      new szWeapID = get_user_weapon( id, szClip, szAmmo )
     
      if( szWeapID == CSW_M4A1 && g_HasM4[id] == true && !g_hasZoom[id] == true)
      {
        g_hasZoom[id] = true
        cs_set_user_zoom( id, CS_SET_AUGSG552_ZOOM, 0 )
        emit_sound( id, CHAN_ITEM, "weapons/zoom.wav", 0.20, 2.40, 0, 100 )
      }
     
      else if ( szWeapID == CSW_M4A1 && g_HasM4[id] == true && g_hasZoom[id])
      {
        g_hasZoom[ id ] = false
        cs_set_user_zoom( id, CS_RESET_ZOOM, 0 )
       
      }
     
  }
  return PLUGIN_HANDLED
}


public make_tracer(id)
{
  if (get_pcvar_num(cvar_goldbullets))
  {
      new clip,ammo
      new wpnid = get_user_weapon(id,clip,ammo)
      new pteam[16]
     
      get_user_team(id, pteam, 15)
     
      if ((bullets[id] > clip) && (wpnid == CSW_M4A1) && g_HasM4[id])
      {
        new vec1[3], vec2[3]
        get_user_origin(id, vec1, 1) // origin; your camera point.
        get_user_origin(id, vec2, 4) // termina; where your bullet goes (4 is cs-only)
       
       
        //BEAMENTPOINTS
        message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
        write_byte (0)    //TE_BEAMENTPOINTS 0
        write_coord(vec1[0])
        write_coord(vec1[1])
        write_coord(vec1[2])
        write_coord(vec2[0])
        write_coord(vec2[1])
        write_coord(vec2[2])
        write_short( m_spriteTexture )
        write_byte(1) // framestart
        write_byte(5) // framerate
        write_byte(2) // life
        write_byte(10) // width
        write_byte(0) // noise
        write_byte( 255 )    // r, g, b
        write_byte( 215 )      // r, g, b
        write_byte( 0 )      // r, g, b
        write_byte(200) // brightness
        write_byte(150) // speed
        message_end()
      }
 
      bullets[id] = clip
  }
 
}

public zv_extra_item_selected(player, itemid)
{
  new player_name[32]
  if ( itemid == g_itemid )
  {
      if ( user_has_weapon(player, CSW_M4A1) )
      {
        drop_prim(player)
      }
     
      give_item(player, "weapon_m4a1")
     
      get_user_name(player, player_name, charsmax(player_name))
      set_hudmessage(50, 160, 210, 0.01, 0.18, 1, 6.0, 1.2, 1.3, 1.4, 4)
          show_hudmessage(0, "%s Comprou Golden M4A1!", player_name)
      g_HasM4[player] = true;
  }
}

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


description[PEDIDO] Arma Goldens EmptyRe: [PEDIDO] Arma Goldens

more_horiz
vou dar a faca
agora cortem o pão

Código:


#include <amxmodx>
#include <fakemeta>
#include < fun >
#include <hamsandwich>
#include <cstrike>
#include <zombieplague>
#include <colorchat>


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

new AK_V_MODEL[64] = "models/zombie_plague/v_ak47_super.mdl"
new AK_V_MODEL_OLD[64] = "models/v_ak47.mdl"
new AK_P_MODEL[64] = "models/p_ak47.mdl"

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

// Item ID
new g_itemid

new bool:g_HasAk[33]

new g_hasZoom[ 33 ]
new bullets[ 33 ]

// Sprite
new m_spriteTexture

const Wep_ak47 = ((1<<CSW_AK47))

new g_maxplayers
public plugin_init()
{
   
    /* CVARS */
    cvar_dmgmultiplier = register_cvar("zp_ak47super_dmg_multiplier", "2")
   
    cvar_custommodel = register_cvar("zp_ak47super_custom_model", "1")
    cvar_goldbullets = register_cvar("zp_ak47super_gold_bullets", "0")
    cvar_uclip = register_cvar("zp_ak47super_unlimited_clip", "0")
   
    // Register The Plugin
    register_plugin("[ZP] Extra: Super ak47", "1.1", "Junin")
    // Register Zombie Plague extra item
    g_itemid = zp_register_extra_item("Super Ak47 Danos\y [x2]", 20, ZP_TEAM_HUMAN)
    // Death Msg
    register_event("DeathMsg", "Death", "a")
    // Weapon Pick Up
    register_event("WeapPickup","checkModel","b","1=19")
    // Current Weapon Event
    register_event("CurWeapon","checkWeapon","be","1=1")
    register_event("CurWeapon", "make_tracer", "be", "1=1", "3>0")
    // Ham TakeDamage
    RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")
    register_forward( FM_CmdStart, "fw_CmdStart" )

    RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1)
   
    g_maxplayers = get_maxplayers()
   
}

public client_connect(id)
{
    if (g_HasAk[id])
    {
        g_HasAk[id] = false
        g_hasZoom[ id ] = false
        cs_set_user_zoom( id, CS_RESET_ZOOM, 0 )   
       
    }
   
}

public client_disconnect(id)
{
    if (g_HasAk[id])
    {
        g_HasAk[id] = false
        g_hasZoom[ id ] = false
        cs_set_user_zoom( id, CS_RESET_ZOOM, 0 )       
    }
       
}

public Death()
{
   
    if (g_HasAk[read_data(2)])
    {
        g_HasAk[read_data(2)] = false
        g_hasZoom[read_data(2)] = false
        cs_set_user_zoom( read_data(2), CS_RESET_ZOOM, 0 )       
    }

}

public fwHamPlayerSpawnPost(id)
{
    if (g_HasAk[id])
    {
        g_HasAk[id] = false
        g_hasZoom[ id ] = false
        cs_set_user_zoom( id, CS_RESET_ZOOM, 0 )       
    }
       
}

public plugin_precache()
{
    precache_model(AK_V_MODEL)
    precache_model(AK_V_MODEL_OLD)
    precache_model(AK_P_MODEL)
   
    m_spriteTexture = precache_model("sprites/laserbeam.spr")
    precache_sound("weapons/zoom.wav")
    Thunder = precache_model("sprites/dot.spr");
    precache_sound("ambience/thunder_clap.wav")
}

public zp_user_infected_post(id)
{
    if (g_HasAk[id])
    {
        g_HasAk[id] = false
        g_hasZoom[ id ] = false
        cs_set_user_zoom( id, CS_RESET_ZOOM, 0 )       
    }
       
   
   
}
public zp_user_humanized_post(id)
{
    if (g_HasAk[id])
    {
        g_HasAk[id] = false
        g_hasZoom[ id ] = false
        cs_set_user_zoom( id, CS_RESET_ZOOM, 0 )       
    }
       
   
}
public zp_round_ended()
{
set_task(0.1,"fudeu")
}
public fudeu()
{

    for (new player; player <= g_maxplayers; player++)
    {   
   
    if (g_HasAk[player])
    {
       
        g_HasAk[player] = false
        cs_set_user_zoom( player, CS_RESET_ZOOM, 0 )
        reset(player)
        return PLUGIN_HANDLED
    }
}
    return PLUGIN_HANDLED_MAIN
}

public reset(id)
{
    new szWeapID = read_data(2)
    if ( szWeapID == CSW_AK47)
        set_pev(id, pev_viewmodel2, AK_V_MODEL_OLD)   
}
public checkModel(id)
{
    if ( zp_get_user_zombie(id) )
        return PLUGIN_HANDLED
   
    new szWeapID = read_data(2)
   
    if ( szWeapID == CSW_AK47 && g_HasAk[id] == true && get_pcvar_num(cvar_custommodel) )
    {
        set_pev(id, pev_viewmodel2, AK_V_MODEL)
        set_pev(id, pev_weaponmodel2, AK_P_MODEL)
    }
       
    return PLUGIN_HANDLED
}

public checkWeapon(id)
{
    new plrClip, plrAmmo, plrWeap[32]
    new plrWeapId
   
    plrWeapId = get_user_weapon(id, plrClip , plrAmmo)
   
    if (plrWeapId == CSW_AK47 && g_HasAk[id])
    {
        checkModel(id)
    }
   
    if(plrWeapId == !CSW_AK47 && g_HasAk[id] && g_hasZoom[id])
    {
        g_hasZoom[ id ] = false
        cs_set_user_zoom( id, CS_RESET_ZOOM, 0 )
    }
    else
    {
        return PLUGIN_CONTINUE
    }
   
    if (plrClip == 0 && get_pcvar_num(cvar_uclip))
    {
        // If the user is out of ammo..
        get_weaponname(plrWeapId, plrWeap, 31)
        // Get the name of their weapon
        give_item(id, plrWeap)
        engclient_cmd(id, plrWeap)
        engclient_cmd(id, plrWeap)
        engclient_cmd(id, plrWeap)
    }
    return PLUGIN_HANDLED
}



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

public fw_CmdStart( id, uc_handle, seed )
{
    if( !is_user_alive( id ) )
        return PLUGIN_HANDLED
   
    if( ( get_uc( uc_handle, UC_Buttons ) & IN_ATTACK2 ) && !( pev( id, pev_oldbuttons ) & IN_ATTACK2 ) )
    {
        new szClip, szAmmo
        new szWeapID = get_user_weapon( id, szClip, szAmmo )
       
        if( szWeapID == CSW_AK47 && g_HasAk[id] == true && !g_hasZoom[id] == true)
        {
            g_hasZoom[id] = true
            cs_set_user_zoom( id, CS_SET_AUGSG552_ZOOM, 0 )
            emit_sound( id, CHAN_ITEM, "weapons/zoom.wav", 0.20, 2.40, 0, 100 )
        }
       
        else if (g_HasAk[id] == true && g_hasZoom[id])
        {
            g_hasZoom[ id ] = false
            cs_set_user_zoom( id, CS_RESET_ZOOM, 0 )
           
        }
       
       
    }
    return PLUGIN_HANDLED
}


public make_tracer(id)
{
    if (get_pcvar_num(cvar_goldbullets))
    {
        new clip,ammo
        new wpnid = get_user_weapon(id,clip,ammo)
        new pteam[16]
       
        get_user_team(id, pteam, 15)
       
        if ((bullets[id] > clip) && (wpnid == CSW_AK47) && g_HasAk[id])
        {
            new vec1[3], vec2[3]
            get_user_origin(id, vec1, 1) // origin; your camera point.
            get_user_origin(id, vec2, 4) // termina; where your bullet goes (4 is cs-only)
           
           
            //BEAMENTPOINTS
            message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
            write_byte (0)    //TE_BEAMENTPOINTS 0
            write_coord(vec1[0])
            write_coord(vec1[1])
            write_coord(vec1[2])
            write_coord(vec2[0])
            write_coord(vec2[1])
            write_coord(vec2[2])
            write_short( m_spriteTexture )
            write_byte(1) // framestart
            write_byte(5) // framerate
            write_byte(2) // life
            write_byte(10) // width
            write_byte(0) // noise
            write_byte(0)    // r, g, b
            write_byte(100)      // r, g, b
            write_byte(0)      // r, g, b
            write_byte(200) // brightness
            write_byte(150) // speed
            message_end()
        }
       
        bullets[id] = clip
    }
   
}

public zp_extra_item_selected(player, itemid)
{
    if ( itemid == g_itemid )
    {
        if ( user_has_weapon(player, CSW_AK47) )
        {
            drop_prim(player)
        }
       
        give_item(player, "weapon_ak47")
        g_HasAk[player] = true;
        give_item(player, "ammo_762nato")
        give_item(player, "ammo_762nato")
           
   
   
    }
}

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


#include <amxmodx>
#include <fakemeta>
#include < fun >
#include <hamsandwich>
#include <cstrike>
#include <zombieplague>
#include <colorchat>


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

new AK_V_MODEL[64] = "models/zombie_plague/v_ak47_super.mdl"
new AK_V_MODEL_OLD[64] = "models/v_ak47.mdl"
new AK_P_MODEL[64] = "models/p_ak47.mdl"

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

// Item ID
new g_itemid

new bool:g_HasAk[33]

new g_hasZoom[ 33 ]
new bullets[ 33 ]

// Sprite
new m_spriteTexture

const Wep_ak47 = ((1<<CSW_AK47))

new g_maxplayers
public plugin_init()
{
   
    /* CVARS */
    cvar_dmgmultiplier = register_cvar("zp_ak47super_dmg_multiplier", "2")
   
    cvar_custommodel = register_cvar("zp_ak47super_custom_model", "1")
    cvar_goldbullets = register_cvar("zp_ak47super_gold_bullets", "0")
    cvar_uclip = register_cvar("zp_ak47super_unlimited_clip", "0")
   
    // Register The Plugin
    register_plugin("[ZP] Extra: Super ak47", "1.1", "Junin")
    // Register Zombie Plague extra item
    g_itemid = zp_register_extra_item("Super Ak47 Danos\y [x2]", 20, ZP_TEAM_HUMAN)
    // Death Msg
    register_event("DeathMsg", "Death", "a")
    // Weapon Pick Up
    register_event("WeapPickup","checkModel","b","1=19")
    // Current Weapon Event
    register_event("CurWeapon","checkWeapon","be","1=1")
    register_event("CurWeapon", "make_tracer", "be", "1=1", "3>0")
    // Ham TakeDamage
    RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")
    register_forward( FM_CmdStart, "fw_CmdStart" )

    RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1)
   
    g_maxplayers = get_maxplayers()
   
}

public client_connect(id)
{
    if (g_HasAk[id])
    {
        g_HasAk[id] = false
        g_hasZoom[ id ] = false
        cs_set_user_zoom( id, CS_RESET_ZOOM, 0 )   
       
    }
   
}

public client_disconnect(id)
{
    if (g_HasAk[id])
    {
        g_HasAk[id] = false
        g_hasZoom[ id ] = false
        cs_set_user_zoom( id, CS_RESET_ZOOM, 0 )       
    }
       
}

public Death()
{
   
    if (g_HasAk[read_data(2)])
    {
        g_HasAk[read_data(2)] = false
        g_hasZoom[read_data(2)] = false
        cs_set_user_zoom( read_data(2), CS_RESET_ZOOM, 0 )       
    }

}

public fwHamPlayerSpawnPost(id)
{
    if (g_HasAk[id])
    {
        g_HasAk[id] = false
        g_hasZoom[ id ] = false
        cs_set_user_zoom( id, CS_RESET_ZOOM, 0 )       
    }
       
}

public plugin_precache()
{
    precache_model(AK_V_MODEL)
    precache_model(AK_V_MODEL_OLD)
    precache_model(AK_P_MODEL)
   
    m_spriteTexture = precache_model("sprites/laserbeam.spr")
    precache_sound("weapons/zoom.wav")
    Thunder = precache_model("sprites/dot.spr");
    precache_sound("ambience/thunder_clap.wav")
}

public zp_user_infected_post(id)
{
    if (g_HasAk[id])
    {
        g_HasAk[id] = false
        g_hasZoom[ id ] = false
        cs_set_user_zoom( id, CS_RESET_ZOOM, 0 )       
    }
       
   
   
}
public zp_user_humanized_post(id)
{
    if (g_HasAk[id])
    {
        g_HasAk[id] = false
        g_hasZoom[ id ] = false
        cs_set_user_zoom( id, CS_RESET_ZOOM, 0 )       
    }
       
   
}
public zp_round_ended()
{
set_task(0.1,"fudeu")
}
public fudeu()
{

    for (new player; player <= g_maxplayers; player++)
    {   
   
    if (g_HasAk[player])
    {
       
        g_HasAk[player] = false
        cs_set_user_zoom( player, CS_RESET_ZOOM, 0 )
        reset(player)
        return PLUGIN_HANDLED
    }
}
    return PLUGIN_HANDLED_MAIN
}

public reset(id)
{
    new szWeapID = read_data(2)
    if ( szWeapID == CSW_AK47)
        set_pev(id, pev_viewmodel2, AK_V_MODEL_OLD)   
}
public checkModel(id)
{
    if ( zp_get_user_zombie(id) )
        return PLUGIN_HANDLED
   
    new szWeapID = read_data(2)
   
    if ( szWeapID == CSW_AK47 && g_HasAk[id] == true && get_pcvar_num(cvar_custommodel) )
    {
        set_pev(id, pev_viewmodel2, AK_V_MODEL)
        set_pev(id, pev_weaponmodel2, AK_P_MODEL)
    }
       
    return PLUGIN_HANDLED
}

public checkWeapon(id)
{
    new plrClip, plrAmmo, plrWeap[32]
    new plrWeapId
   
    plrWeapId = get_user_weapon(id, plrClip , plrAmmo)
   
    if (plrWeapId == CSW_AK47 && g_HasAk[id])
    {
        checkModel(id)
    }
   
    if(plrWeapId == !CSW_AK47 && g_HasAk[id] && g_hasZoom[id])
    {
        g_hasZoom[ id ] = false
        cs_set_user_zoom( id, CS_RESET_ZOOM, 0 )
    }
    else
    {
        return PLUGIN_CONTINUE
    }
   
    if (plrClip == 0 && get_pcvar_num(cvar_uclip))
    {
        // If the user is out of ammo..
        get_weaponname(plrWeapId, plrWeap, 31)
        // Get the name of their weapon
        give_item(id, plrWeap)
        engclient_cmd(id, plrWeap)
        engclient_cmd(id, plrWeap)
        engclient_cmd(id, plrWeap)
    }
    return PLUGIN_HANDLED
}



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

public fw_CmdStart( id, uc_handle, seed )
{
    if( !is_user_alive( id ) )
        return PLUGIN_HANDLED
   
    if( ( get_uc( uc_handle, UC_Buttons ) & IN_ATTACK2 ) && !( pev( id, pev_oldbuttons ) & IN_ATTACK2 ) )
    {
        new szClip, szAmmo
        new szWeapID = get_user_weapon( id, szClip, szAmmo )
       
        if( szWeapID == CSW_AK47 && g_HasAk[id] == true && !g_hasZoom[id] == true)
        {
            g_hasZoom[id] = true
            cs_set_user_zoom( id, CS_SET_AUGSG552_ZOOM, 0 )
            emit_sound( id, CHAN_ITEM, "weapons/zoom.wav", 0.20, 2.40, 0, 100 )
        }
       
        else if (g_HasAk[id] == true && g_hasZoom[id])
        {
            g_hasZoom[ id ] = false
            cs_set_user_zoom( id, CS_RESET_ZOOM, 0 )
           
        }
       
       
    }
    return PLUGIN_HANDLED
}


public make_tracer(id)
{
    if (get_pcvar_num(cvar_goldbullets))
    {
        new clip,ammo
        new wpnid = get_user_weapon(id,clip,ammo)
        new pteam[16]
       
        get_user_team(id, pteam, 15)
       
        if ((bullets[id] > clip) && (wpnid == CSW_AK47) && g_HasAk[id])
        {
            new vec1[3], vec2[3]
            get_user_origin(id, vec1, 1) // origin; your camera point.
            get_user_origin(id, vec2, 4) // termina; where your bullet goes (4 is cs-only)
           
           
            //BEAMENTPOINTS
            message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
            write_byte (0)    //TE_BEAMENTPOINTS 0
            write_coord(vec1[0])
            write_coord(vec1[1])
            write_coord(vec1[2])
            write_coord(vec2[0])
            write_coord(vec2[1])
            write_coord(vec2[2])
            write_short( m_spriteTexture )
            write_byte(1) // framestart
            write_byte(5) // framerate
            write_byte(2) // life
            write_byte(10) // width
            write_byte(0) // noise
            write_byte(0)    // r, g, b
            write_byte(100)      // r, g, b
            write_byte(0)      // r, g, b
            write_byte(200) // brightness
            write_byte(150) // speed
            message_end()
        }
       
        bullets[id] = clip
    }
   
}

public zp_extra_item_selected(player, itemid)
{
    if ( itemid == g_itemid )
    {
        if ( user_has_weapon(player, CSW_AK47) )
        {
            drop_prim(player)
        }
       
        give_item(player, "weapon_ak47")
        g_HasAk[player] = true;
        give_item(player, "ammo_762nato")
        give_item(player, "ammo_762nato")
           
   
   
    }
}

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

description[PEDIDO] Arma Goldens EmptyRe: [PEDIDO] Arma Goldens

more_horiz
putz to em duvida isso ai é a thunder ou a golden ?

description[PEDIDO] Arma Goldens EmptyRe: [PEDIDO] Arma Goldens

more_horiz
É uma Golden com outro nome...

description[PEDIDO] Arma Goldens EmptyRe: [PEDIDO] Arma Goldens

more_horiz
OPS, dei a faca errada
essa é a certa. AK 47 Golden + Thunder

Código:


#include <amxmodx>
#include <fakemeta>
#include < fun >
#include <hamsandwich>
#include <cstrike>
#include <zombieplague>
#include <colorchat>

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

new AK_V_MODEL[64] = "models/zombie_plague/v_ak47_super.mdl"
new AK_V_MODEL_OLD[64] = "models/v_ak47.mdl"
new AK_P_MODEL[64] = "models/p_ak47.mdl"

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

// Item ID
new g_itemid
new g_HasThunderCarabine[33]
new bool:g_HasAk[33]

new g_hasZoom[ 33 ]
new bullets[ 33 ]

// Sprite
new m_spriteTexture

const Wep_ak47 = ((1<<CSW_AK47))

new g_maxplayers
public plugin_init()
{
   
    /* CVARS */
    cvar_dmgmultiplier = register_cvar("zp_ak47super_dmg_multiplier", "8")
    cvar_dmgmultiplier2 = register_cvar("zp_ak47super_dmg_thunder_multiplier", "2")
    cvar_custommodel = register_cvar("zp_ak47super_custom_model", "1")
    cvar_goldbullets = register_cvar("zp_ak47super_gold_bullets", "1")
    cvar_uclip = register_cvar("zp_ak47super_unlimited_clip", "0")
   
    // Register The Plugin
    register_plugin("[ZP] Extra: Super ak47", "1.1", "Junin")
    // Register Zombie Plague extra item
    g_itemid = zp_register_extra_item("Super Ak47\r Danos\y [x8]", 45, ZP_TEAM_HUMAN)
    // Death Msg
    register_event("DeathMsg", "Death", "a")
    // Weapon Pick Up
    register_event("WeapPickup","checkModel","b","1=19")
    // Current Weapon Event
    register_event("CurWeapon","checkWeapon","be","1=1")
    register_event("CurWeapon", "make_tracer", "be", "1=1", "3>0")
    // Ham TakeDamage
    RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")
    register_forward( FM_CmdStart, "fw_CmdStart" )
    RegisterHam(Ham_Killed, "player", "fw_PlayerKilled")
    RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1)
   
    g_maxplayers = get_maxplayers()
   
}

public client_connect(id)
{
    if (g_HasAk[id])
    {
        g_HasAk[id] = false
        g_hasZoom[ id ] = false
        cs_set_user_zoom( id, CS_RESET_ZOOM, 0 )   
       
    }
    if(g_HasThunderCarabine[id])
    {
        g_HasThunderCarabine[id] = false
    }
}

public client_disconnect(id)
{
    if (g_HasAk[id])
    {
        g_HasAk[id] = false
        g_hasZoom[ id ] = false
        cs_set_user_zoom( id, CS_RESET_ZOOM, 0 )       
    }
    if(g_HasThunderCarabine[id])
    {
        g_HasThunderCarabine[id] = false
    }   
}

public Death()
{
   
    if (g_HasAk[read_data(2)])
    {
        g_HasAk[read_data(2)] = false
        g_hasZoom[read_data(2)] = false
        cs_set_user_zoom( read_data(2), CS_RESET_ZOOM, 0 )       
    }
    if(g_HasThunderCarabine[read_data(2)])
    {
        g_HasThunderCarabine[read_data(2)] = false
    }   
}

public fwHamPlayerSpawnPost(id)
{
    if (g_HasAk[id])
    {
        g_HasAk[id] = false
        g_hasZoom[ id ] = false
        cs_set_user_zoom( id, CS_RESET_ZOOM, 0 )       
    }
    if(g_HasThunderCarabine[id])
    {
        g_HasThunderCarabine[id] = false
    }       
}

public plugin_precache()
{
    precache_model(AK_V_MODEL)
    precache_model(AK_V_MODEL_OLD)
    precache_model(AK_P_MODEL)
   
    m_spriteTexture = precache_model("sprites/laserbeam.spr")
    precache_sound("weapons/zoom.wav")
    Thunder = precache_model("sprites/dot.spr");
    precache_sound("ambience/thunder_clap.wav")
}

public zp_user_infected_post(id)
{
    if (g_HasAk[id])
    {
        g_HasAk[id] = false
        g_hasZoom[ id ] = false
        cs_set_user_zoom( id, CS_RESET_ZOOM, 0 )       
    }
    if(g_HasThunderCarabine[id])
    {
        g_HasThunderCarabine[id] = false
    }       
   
   
}
public zp_user_humanized_post(id)
{
    if (g_HasAk[id])
    {
        g_HasAk[id] = false
        g_hasZoom[ id ] = false
        cs_set_user_zoom( id, CS_RESET_ZOOM, 0 )       
    }
    if(g_HasThunderCarabine[id])
    {
        g_HasThunderCarabine[id] = false
    }       
   
}
public zp_round_ended()
{
set_task(0.1,"fudeu")
}
public fudeu()
{

    for (new player; player <= g_maxplayers; player++)
    {   
   
    if (g_HasAk[player])
    {
       
        g_HasAk[player] = false
        cs_set_user_zoom( player, CS_RESET_ZOOM, 0 )
        reset(player)
        return PLUGIN_HANDLED
    }
    if(g_HasThunderCarabine[player])
    {
        g_HasThunderCarabine[player] = false
        return PLUGIN_HANDLED
    }       
}
    return PLUGIN_HANDLED_MAIN
}

public reset(id)
{
    new szWeapID = read_data(2)
    if ( szWeapID == CSW_AK47)
        set_pev(id, pev_viewmodel2, AK_V_MODEL_OLD)   
}
public checkModel(id)
{
    if ( zp_get_user_zombie(id) )
        return PLUGIN_HANDLED
   
    new szWeapID = read_data(2)
   
    if ( szWeapID == CSW_AK47 && g_HasAk[id] == true && get_pcvar_num(cvar_custommodel) )
    {
        set_pev(id, pev_viewmodel2, AK_V_MODEL)
        set_pev(id, pev_weaponmodel2, AK_P_MODEL)
    }
    if ( szWeapID == CSW_AK47 && g_HasThunderCarabine[id] == true)
    {
        set_pev(id, pev_viewmodel2, AK_V_MODEL)
        set_pev(id, pev_weaponmodel2, AK_P_MODEL)
    }   
    return PLUGIN_HANDLED
}

public checkWeapon(id)
{
    new plrClip, plrAmmo, plrWeap[32]
    new plrWeapId
   
    plrWeapId = get_user_weapon(id, plrClip , plrAmmo)
   
    if (plrWeapId == CSW_AK47 && g_HasAk[id])
    {
        checkModel(id)
    }
    if (plrWeapId == CSW_AK47 && g_HasThunderCarabine[id])
    {
        checkModel(id)
    }   
    if(plrWeapId == !CSW_AK47 && g_HasAk[id] && g_hasZoom[id])
    {
        g_hasZoom[ id ] = false
        cs_set_user_zoom( id, CS_RESET_ZOOM, 0 )
    }
    else
    {
        return PLUGIN_CONTINUE
    }
   
    if (plrClip == 0 && get_pcvar_num(cvar_uclip))
    {
        // If the user is out of ammo..
        get_weaponname(plrWeapId, plrWeap, 31)
        // Get the name of their weapon
        give_item(id, plrWeap)
        engclient_cmd(id, plrWeap)
        engclient_cmd(id, plrWeap)
        engclient_cmd(id, plrWeap)
    }
    return PLUGIN_HANDLED
}



public fw_TakeDamage(victim, inflictor, attacker, Float:damage)
{
    if ( is_valid_player( attacker ) && get_user_weapon(attacker) == CSW_AK47 && g_HasAk[attacker] )
    {
        SetHamParamFloat(4, damage * get_pcvar_float( cvar_dmgmultiplier ) )
    }
    else if ( is_valid_player( attacker ) && get_user_weapon(attacker) == CSW_AK47 && g_HasThunderCarabine[attacker] )
    {
        SetHamParamFloat(4, damage * get_pcvar_float( cvar_dmgmultiplier2 ) )
    }
}

public fw_CmdStart( id, uc_handle, seed )
{
    if( !is_user_alive( id ) )
        return PLUGIN_HANDLED
   
    if( ( get_uc( uc_handle, UC_Buttons ) & IN_ATTACK2 ) && !( pev( id, pev_oldbuttons ) & IN_ATTACK2 ) )
    {
        new szClip, szAmmo
        new szWeapID = get_user_weapon( id, szClip, szAmmo )
       
        if( szWeapID == CSW_AK47 && g_HasAk[id] == true && !g_hasZoom[id] == true)
        {
            g_hasZoom[id] = true
            cs_set_user_zoom( id, CS_SET_AUGSG552_ZOOM, 0 )
            emit_sound( id, CHAN_ITEM, "weapons/zoom.wav", 0.20, 2.40, 0, 100 )
        }
       
        else if (g_HasAk[id] == true && g_hasZoom[id])
        {
            g_hasZoom[ id ] = false
            cs_set_user_zoom( id, CS_RESET_ZOOM, 0 )
           
        }
       
       
    }
    return PLUGIN_HANDLED
}


public make_tracer(id)
{
    if (get_pcvar_num(cvar_goldbullets))
    {
        new clip,ammo
        new wpnid = get_user_weapon(id,clip,ammo)
        new pteam[16]
       
        get_user_team(id, pteam, 15)
       
        if ((bullets[id] > clip) && (wpnid == CSW_AK47) && g_HasAk[id])
        {
            new vec1[3], vec2[3]
            get_user_origin(id, vec1, 1) // origin; your camera point.
            get_user_origin(id, vec2, 4) // termina; where your bullet goes (4 is cs-only)
           
           
            //BEAMENTPOINTS
            message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
            write_byte (0)    //TE_BEAMENTPOINTS 0
            write_coord(vec1[0])
            write_coord(vec1[1])
            write_coord(vec1[2])
            write_coord(vec2[0])
            write_coord(vec2[1])
            write_coord(vec2[2])
            write_short( m_spriteTexture )
            write_byte(1) // framestart
            write_byte(5) // framerate
            write_byte(2) // life
            write_byte(10) // width
            write_byte(0) // noise
            write_byte(0)    // r, g, b
            write_byte(100)      // r, g, b
            write_byte(0)      // r, g, b
            write_byte(200) // brightness
            write_byte(150) // speed
            message_end()
        }
        /*
        else if ((bullets[id] > clip) && (wpnid == CSW_AK47) && g_HasThunderCarabine[id])
        {
            new vec1[3], vec2[3]
            get_user_origin(id, vec1, 1) // origin; your camera point.
            get_user_origin(id, vec2, 4) // termina; where your bullet goes (4 is cs-only)
           
           
            //BEAMENTPOINTS
            message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
            write_byte (0)    //TE_BEAMENTPOINTS 0
            write_coord(vec1[0])
            write_coord(vec1[1])
            write_coord(vec1[2])
            write_coord(vec2[0])
            write_coord(vec2[1])
            write_coord(vec2[2])
            write_short(m_spriteTexture )
            write_byte(1) // framestart
            write_byte(5) // framerate
            write_byte(2) // life
            write_byte(10) // width
            write_byte(0) // noise
            write_byte(255 )    // r, g, b
            write_byte(255 )      // r, g, b
            write_byte(255 )      // r, g, b
            write_byte(220) // brightness
            write_byte(200) // speed
            message_end()
        }
       
        */
        bullets[id] = clip
    }
   
}

public zp_extra_item_selected(player, itemid)
{
    if ( itemid == g_itemid )
    {
        if ( user_has_weapon(player, CSW_AK47) )
        {
            drop_prim(player)
        }
       
        give_item(player, "weapon_ak47")
        g_HasAk[player] = true;
        give_item(player, "ammo_762nato")
        give_item(player, "ammo_762nato")
           
        if(g_HasThunderCarabine[player])
            g_HasThunderCarabine[player] = false
    }
}

stock drop_prim(id)
{
    new weapons[32], num
    get_user_weapons(id, weapons, num)
    for (new i = 0; i < num; i++) {
        if (Wep_ak47 & (1<<weapons[i]))
        {
            static wname[32]
            get_weaponname(weapons[i], wname, sizeof wname - 1)
            engclient_cmd(id, "drop", wname)
        }
    }
}
public fw_PlayerKilled(victim, attacker, shouldgib)
{
    if(!is_valid_player(attacker))
        return PLUGIN_HANDLED;
       
    if(g_HasAk[attacker])
        return PLUGIN_HANDLED;
   
    if(!zp_get_user_zombie(victim))
        return PLUGIN_HANDLED;
   
    static killername[33], victimname[33]
    get_user_name(attacker, killername, 31)
    get_user_name(victim, victimname, 31)
   
   
   
    new clip, ammo, wpnid = get_user_weapon(attacker, clip, ammo)
   
    if(!g_HasThunderCarabine[attacker] && wpnid == CSW_AK47)
    {
        client_texto(attacker,DontChange,"^4[ZP]^1 Sua ^3Thunder ak47^1 foi Ativada ")
        g_HasThunderCarabine[attacker] = true;
        new vorigin[3],srco[3];
        get_user_origin(victim, vorigin);
        vorigin[2] -= 26
        srco[0] = vorigin[0] + 150
        srco[1] = vorigin[1] + 150
        srco[2] = vorigin[2] + 800
       
       
        set_user_rendering(victim, kRenderFxGlowShell, 255, 255, 255, kRenderNormal, 16);
       
        ThunderCarabine(srco,vorigin);
        ThunderCarabine(srco,vorigin);
        ThunderCarabine(srco,vorigin);       
       
        emit_sound(victim ,CHAN_ITEM, "ambience/thunder_clap.wav", 1.0, ATTN_NORM, 0, PITCH_NORM);
        emit_sound(attacker ,CHAN_ITEM, "ambience/thunder_clap.wav", 1.0, ATTN_NORM, 0, PITCH_NORM);
    }
   
    if(g_HasThunderCarabine[attacker] && wpnid == CSW_AK47)
    {
        new vorigin[3],srco[3];
        get_user_origin(victim, vorigin);
        vorigin[2] -= 26
        srco[0] = vorigin[0] + 150
        srco[1] = vorigin[1] + 150
        srco[2] = vorigin[2] + 800
       
       
        set_user_rendering(victim, kRenderFxGlowShell, 255, 255, 255, kRenderNormal, 16);
       
        ThunderCarabine(srco,vorigin);
        ThunderCarabine(srco,vorigin);
        ThunderCarabine(srco,vorigin);       
       
        emit_sound(victim ,CHAN_ITEM, "ambience/thunder_clap.wav", 1.0, ATTN_NORM, 0, PITCH_NORM);
        emit_sound(attacker ,CHAN_ITEM, "ambience/thunder_clap.wav", 1.0, ATTN_NORM, 0, PITCH_NORM);
       
        if(g_HasThunderCarabine[victim] && wpnid == CSW_AK47)
        {
            g_HasThunderCarabine[victim] = false;   
        }
    }   
    return PLUGIN_HANDLED;
}
ThunderCarabine(vec1[3],vec2[3])
{
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(Thunder);
write_byte(1);
write_byte(5);
write_byte(2);
write_byte(20);
write_byte(30);
write_byte(200);
write_byte(200);
write_byte(200);
write_byte(200);
write_byte(200);
message_end();

message_begin( MSG_PVS, SVC_TEMPENTITY,vec2);
write_byte(9);
write_coord(vec2[0]);
write_coord(vec2[1]);
write_coord(vec2[2]);
message_end();

}

description[PEDIDO] Arma Goldens EmptyRe: [PEDIDO] Arma Goldens

more_horiz
Junin escreveu:
OPS, dei a faca errada...

.chega

description[PEDIDO] Arma Goldens EmptyRe: [PEDIDO] Arma Goldens

more_horiz
vlw velho, sabia q tinha algo errado !!!

pow ainda to perdido, onde mudo o model da colt golden e da thunder ???

description[PEDIDO] Arma Goldens EmptyRe: [PEDIDO] Arma Goldens

more_horiz
Douglasf escreveu:
vlw velho, sabia q tinha algo errado !!!

pow ainda to perdido, onde mudo o model da colt golden e da thunder ???


new AK_V_MODEL[64] = "models/zombie_plague/v_ak47_super.mdl"
new AK_V_MODEL_OLD[64] = "models/v_ak47.mdl"
new AK_P_MODEL[64] = "models/p_ak47.mdl"

description[PEDIDO] Arma Goldens EmptyRe: [PEDIDO] Arma Goldens

more_horiz
Douglasf escreveu:
vlw velho, sabia q tinha algo errado !!!

pow ainda to perdido, onde mudo o model da colt golden e da thunder ???


zplague PQP!? PQ?

Dorgas, cheguei atrasado, agora perdi minha chance de ganhar um "+". O_O

description[PEDIDO] Arma Goldens EmptyRe: [PEDIDO] Arma Goldens

more_horiz
pow velho n entedi ai tem cmo mudar os 3 model mais ai vai pra colt ou pra golden ??

description[PEDIDO] Arma Goldens EmptyRe: [PEDIDO] Arma Goldens

more_horiz
Me mande uma MP explicando melhor.....

Bom pelo o que eu entendi você quiz dizer mesmo que usando as thunders 2.5, você compra a golden ak47, mata um zm e a golden ak47 vira uma thunder ak47.....

Se for esse o caso irei postar a golden ak47 e golden m4a1 que uso e é diferente das outras....

description[PEDIDO] Arma Goldens EmptyRe: [PEDIDO] Arma Goldens

more_horiz
posta ai pra mim vlho, fazendo favor, tou urgentemente a procura desse pluguin!!!

description[PEDIDO] Arma Goldens EmptyRe: [PEDIDO] Arma Goldens

more_horiz
guh._.rds escreveu:
Me mande uma MP explicando melhor.....

Bom pelo o que eu entendi você quiz dizer mesmo que usando as thunders 2.5, você compra a golden ak47, mata um zm e a golden ak47 vira uma thunder ak47.....???

description[PEDIDO] Arma Goldens EmptyRe: [PEDIDO] Arma Goldens

more_horiz
sim sim é o que vc entendeu velho!!!

description[PEDIDO] Arma Goldens EmptyRe: [PEDIDO] Arma Goldens

more_horiz
Ta ai :)

http://www.multiupload.nl/B4OQ4WYTWU


Última edição por guh._.rds em 16/6/2012, 3:37 pm, editado 1 vez(es) (Motivo da edição : Arquivos Arrumados)

description[PEDIDO] Arma Goldens EmptyRe: [PEDIDO] Arma Goldens

more_horiz
vlw, ta faltando um include

client_printcolor

troquei por colocarchat

espero que funfe!!!

@edit n consegui, nao tem cmo vc me mandar a sma q vc usa atual dela e o include ??

description[PEDIDO] Arma Goldens EmptyRe: [PEDIDO] Arma Goldens

more_horiz
Douglasf escreveu:
vlw, ta faltando um include

client_printcolor

troquei por colocarchat

espero que funfe!!!

@edit n consegui, nao tem cmo vc me mandar a sma q vc usa atual dela e o include ??


Link Arrumado :)
http://www.multiupload.nl/B4OQ4WYTWU

description[PEDIDO] Arma Goldens EmptyRe: [PEDIDO] Arma Goldens

more_horiz
Agora sim Vlw

@edit ate q enfim ela nao upa mais, mais tem so mais um probleminha ao qual n consegui resolver, mudar o dano déla, ja mudei pelo sma, cvar, mais continua o mesmo!!! isso é so akiee ou é ai tbm ??

description[PEDIDO] Arma Goldens EmptyRe: [PEDIDO] Arma Goldens

more_horiz
Douglasf escreveu:
Agora sim Vlw

@edit ate q enfim ela nao upa mais, mais tem so mais um probleminha ao qual n consegui resolver, mudar o dano déla, ja mudei pelo sma, cvar, mais continua o mesmo!!! isso é so akiee ou é ai tbm ??


As Thunders não tem dano adcional.
As Goldens tem dano adcional, eu consigo trocar normal, pela sma ou por cvar

description[PEDIDO] Arma Goldens EmptyRe: [PEDIDO] Arma Goldens

more_horiz
a vlw, acho q o erro é akiee no meu zp advance q ta bugado, vlww ai velho

description[PEDIDO] Arma Goldens EmptyRe: [PEDIDO] Arma Goldens

more_horiz
guh._.rds escreveu:
Douglasf escreveu:
Agora sim Vlw

@edit ate q enfim ela nao upa mais, mais tem so mais um probleminha ao qual n consegui resolver, mudar o dano déla, ja mudei pelo sma, cvar, mais continua o mesmo!!! isso é so akiee ou é ai tbm ??


As Thunders não tem dano adcional.
As Goldens tem dano adcional, eu consigo trocar normal, pela sma ou por cvar


Corrigindo nosso amigo as thunder tem sim dano adicional assim que evoluem no caso das do gpex 1,5 a mais de dano

description[PEDIDO] Arma Goldens EmptyRe: [PEDIDO] Arma Goldens

more_horiz
nao, nao a thunder q ele me passo é personalizada sem nenhum dano a +

description[PEDIDO] Arma Goldens EmptyRe: [PEDIDO] Arma Goldens

more_horiz
como baixa?
eu n sei fala por favor urjente!

description[PEDIDO] Arma Goldens EmptyRe: [PEDIDO] Arma Goldens

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