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[ZP] Extra : Mira Lazer! Empty[ZP] Extra : Mira Lazer!

more_horiz
Nome do Plugin : Mira lazer ou no Recoil v2
Descrição do Plugin : A Compra você ganha mira lazer tipo do nightcrawler vermelha e ganha no recoil tambem!
Creditos : Allied Modders e eu por colocar o lazer
Plugin : 

Código:

#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <zombieplague>
#include <  xs >

new bool:g_norecoil[33] = false
new Float: cl_pushangle[33][3]
new sprite
new g_itemid_norecoil, g_maxplayers

const WEAPONS_BITSUM = (1<<CSW_KNIFE|1<<CSW_HEGRENADE|1<<CSW_FLASHBANG|1<<CSW_SMOKEGRENADE|1<<CSW_C4)

public plugin_init()
{
 register_plugin("[ZP] Extra Item: No Recoil", "0.1.1", "fezh & Hakitos")

 g_itemid_norecoil = zp_register_extra_item("Mira Lazer \r(1 Round)", 15, ZP_TEAM_HUMAN)

 new weapon_name[24]
 for (new i = 1; i <= 30; i++)
 {
 if (!(WEAPONS_BITSUM & 1 << i) && get_weaponname(i, weapon_name, 23))
 {
 RegisterHam(Ham_Weapon_PrimaryAttack, weapon_name, "fw_Weapon_PrimaryAttack_Pre")
 RegisterHam(Ham_Weapon_PrimaryAttack, weapon_name, "fw_Weapon_PrimaryAttack_Post", 1)
 }
 }

 register_event("HLTV", "event_round_start", "a", "1=0", "2=0")

 g_maxplayers = get_maxplayers()
}

public plugin_precache()
{
 sprite = precache_model("sprites/white.spr")
}

public client_putinserver(id)
{
 g_norecoil[id] = false
}

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

public hook_death(id)
{
 g_norecoil[id] = false
}

public client_PreThink(id)
{
 if(g_norecoil[id] == true)
 {
 new e[3]
 get_user_origin(id, e, 3)
 
 message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
 write_byte (TE_BEAMENTPOINT)
 write_short(id | 0x1000)
 write_coord (e[0]) // Start X
 write_coord (e[1]) // Start Y
 write_coord (e[2]) // Start Z

 write_short(sprite) // Sprite
 
 write_byte (1)       // Start frame
 write_byte (10)     // Frame rate
 write_byte (1) // Life
 write_byte (5)   // Line width
 write_byte (0)     // Noise
 write_byte (255) // Red
 write_byte (0) // Green
 write_byte (0) // Blue
 write_byte (150)     // Brightness
 write_byte (25)       // Scroll speed
 message_end()
 }
 return PLUGIN_HANDLED
}

public zp_extra_item_selected(player, itemid)
{
 if (itemid == g_itemid_norecoil)
 {
 g_norecoil[player] = true
 client_print(player, print_chat, "[ZP] Voce Comprou Mira Lazer por 1 Round!")
 }
}

public zp_user_infected_post(id)
 g_norecoil[id] = false

public client_connect(id)
 g_norecoil[id] = false

public event_round_start()
 for (new id = 1; id <= g_maxplayers; id++)
 g_norecoil[id] = false

public fw_Weapon_PrimaryAttack_Pre(entity)
{
 new id = pev(entity, pev_owner)

 if (g_norecoil[id])
 {
 pev(id, pev_punchangle, cl_pushangle[id])
 return HAM_IGNORED;
 }
 return HAM_IGNORED;
}

public fw_Weapon_PrimaryAttack_Post(entity)
{
 new id = pev(entity, pev_owner)

 if (g_norecoil[id])
 {
 new Float: push[3]
 pev(id, pev_punchangle, push)
 xs_vec_sub(push, cl_pushangle[id], push)
 xs_vec_mul_scalar(push, 0.0, push)
 xs_vec_add(push, cl_pushangle[id], push)
 set_pev(id, pev_punchangle, push)
 return HAM_IGNORED;
 }
 return HAM_IGNORED;
}

 Se Tiver Bugs avisem ! Vlw

Video de Exemplo:

description[ZP] Extra : Mira Lazer! EmptyRe: [ZP] Extra : Mira Lazer!

more_horiz
Soukito ainda é vivo... kkk

description[ZP] Extra : Mira Lazer! EmptyRe: [ZP] Extra : Mira Lazer!

more_horiz
Pse pó to voltando agor kkkk
Dps responde seu tópico la pra nos

description[ZP] Extra : Mira Lazer! EmptyRe: [ZP] Extra : Mira Lazer!

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