Zombie Online
Últimos assuntos
» Zombie Plague Special 2.4 (24/04/2015)por [P]erfec[T] [S]cr[@]s[H] Qui Abr 30 2015, 13:19
» Ideia Para Novos Plugins
por willyan Sáb Dez 21 2013, 02:28
» [Extra Item] Modo Pain
por [P]erfec[T] [S]cr[@]s[H] Ter Dez 03 2013, 10:26
» Criando uma CVAR Simples
por Br7 Dom Dez 01 2013, 12:34
» Regras ao postar seu servidor
por MtsLa!<3.L Dom Dez 01 2013, 11:27
» Regras do nosso fórum
por MtsLa!<3.L Dom Dez 01 2013, 11:23
» [Plugin] Chapeus Natal
por MtsLa!<3.L Sáb Nov 30 2013, 21:20
» [Protecao] Ddos
por jone_pvh Sáb Nov 30 2013, 20:52
» Zombie Plague Advance New Modes v 1.0
por jone_pvh Sáb Nov 30 2013, 11:40
» Uso dos Ammo Packs no fórum
por MtsLa!<3.L Sex Nov 29 2013, 21:57
» (Valve Hammer)Tamanhos
por MtsLa!<3.L Sex Nov 29 2013, 21:48
» [Duelo] MtsLa!<3.L & Dexter S
por MtsLa!<3.L Sex Nov 29 2013, 15:44
» [Extra Item] Modo Goku
por MtsLa!<3.L Sex Nov 29 2013, 12:02
Os membros mais ativos da semana
Nenhum usuário |
Os que mais criam tópicos
MtsLa!<3.L | ||||
[P]erfec[T] [S]cr[@]s[H] | ||||
[D]etonado[R] | ||||
ApC # $ Awp PJL $ | ||||
Synopsis | ||||
Freddy Krueger [Jhadson] | ||||
waLLzyk | ||||
XaropinhoO | ||||
HDjose | ||||
Jovem_BR |
[Item Extra] Modo Jeremias
Melhores Plugins :: COUNTER-STRIKE 1.6 / CZ :: Plugins Amxmodx :: Plugins [Zombie] :: Plugins Brasileiros
Página 1 de 1
[Item Extra] Modo Jeremias
- Código:
// Includes
#include <amxmodx>
#include <amxmisc>
#include < fun >
#include <hamsandwich>
#include <zombieplague>
#include <engine>
#include <fakemeta_util>
#define TASK_AURA 27000
const UNIT_SECOND = (1<<12)
// Defines
#define ITEM_NAME "Modo Jeremias"
#define ITEM_COST 35
new gMsgScreenFade;
new g_msgScreenShake
// Weapons Offsets
#define OFFSET_CLIPAMMO 51
#define OFFSET_LINUX_WEAPONS 4
#define fm_cs_set_weapon_ammo(%1,%2) set_pdata_int(%1, OFFSET_CLIPAMMO, %2, OFFSET_LINUX_WEAPONS)
#define NO_RECOIL_WEAPONS_BITSUM ( 1 << CSW_KNIFE | 1 << CSW_HEGRENADE | 1 << CSW_FLASHBANG | 1 << CSW_SMOKEGRENADE | 1 << CSW_C4 )
new decals[2] = {107,108}
// Players Offsets
#define g_uqz_weapon 373
new bool:g_isDying[33]
new g_decalSwitch[33]
// Max Clips
const WPN_BS = ((1<<CSW_HEGRENADE)|(1<<CSW_SMOKEGRENADE)|(1<<CSW_FLASHBANG)|(1<<CSW_KNIFE)|(1<<CSW_C4))
new const g_MaxClips[] = { 0, 13, 0, 10, 0, 7, 0, 30, 30, 0, 15, 20, 25, 30, 35,
25, 12, 20, 10, 30, 100, 8, 30, 30, 20, 0, 7, 30, 30, 0, 50 }
// Global Variables
new g_maxplayers
new g_uqz
new bool:g_un_clip[33]
new bool:g_damage[33]
new bool:g_norecoil[33]
new cvar_pattack_rate
// Offsets
const m_pPlayer = 41
const m_flNextPrimaryAttack = 46
const m_flNextSecondaryAttack = 47
const m_flTimeWeaponIdle = 48
// Init Plugin
public plugin_init()
{
// Register Plugin
register_plugin("[ZP] Modo Jeremias Beta", "1.0", "Junin")
g_uqz = zp_register_extra_item(ITEM_NAME, ITEM_COST, ZP_TEAM_HUMAN)
cvar_pattack_rate = register_cvar("zp_jeremias_rate", "0.5")
gMsgScreenFade = get_user_msgid("ScreenFade");
g_msgScreenShake = get_user_msgid("ScreenShake")
// Events
register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
register_forward(FM_PlayerPreThink, "fw_PlayerPreThink")
register_event("CurWeapon", "Event_CurWeapon", "be", "1=1")
register_forward(FM_PlayerPreThink, "fm_PlayerPreThink")
// Thanks MasI
new weapon_name[24]
for (new i = 1; i <= 30; i++)
{
if (!(NO_RECOIL_WEAPONS_BITSUM & 1 << i) && get_weaponname(i, weapon_name, 23))
{
RegisterHam(Ham_Weapon_PrimaryAttack, weapon_name, "fw_primary_attack")
RegisterHam(Ham_Weapon_PrimaryAttack, weapon_name, "fw_AWP_PrimaryAttack_Post", 1)
}
}
// End Thanks MasI
// Get MaxPlayers
g_maxplayers = get_maxplayers()
}
// Register Extra Item
public zp_extra_item_selected(player, itemid)
{
if(itemid == g_uqz)
{
if (!zp_has_round_started())
{
client_print(player, print_chat, "[ZP] Espere a primeira infeccao", player, "WAIT")
zp_set_user_ammo_packs(player, zp_get_user_ammo_packs(player) + ITEM_COST)
return
}
new name[32]
new param[1]
param[0] = player
// Armament
strip_user_weapons(player)
give_item(player, "weapon_knife")
give_item(player, "weapon_deagle")
give_item(player, "weapon_m3")
give_item(player, "weapon_hegrenade")
give_item(player, "weapon_flashbang")
give_item(player, "weapon_flashbang")
give_item(player, "weapon_smokegrenade")
//set_user_armor(player,600)
set_task(1.2, "make_footsteps", 4247545+player, param, 1, "b")
set_hudmessage(0, 0, 255, 0.05, 0.45, 1, 0.0, 5.0, 1.0, 1.0, -1)
get_user_name(player, name, 31)
show_hudmessage(0, "%s Esta no Modo Jeremias^nPlugin Feito por Junin^nBrasil 2010", name)
client_print(player, print_chat, "[ZP] Voce tomou umas Caixaca", player)
fm_set_rendering(player, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 0)
g_damage[player] = true
g_isDying[player] = true
g_norecoil[player] = true
g_decalSwitch[player] = 0
g_un_clip[player] = true
}
}
public make_footsteps(param[])
{
new id = param[0]
if(!is_user_alive(id)) return
new origin[3]
get_user_origin(id, origin)
if(entity_get_int(id, EV_INT_bInDuck) == 1)
origin[2] -= 18
else
origin[2] -= 36
new Float:velocity[3]
new Float:ent_angles[3]
new Float:ent_origin[3]
new ent
entity_get_vector(id, EV_VEC_v_angle, ent_angles)
entity_get_vector(id, EV_VEC_origin, ent_origin)
ent = create_entity("info_target")
if(ent > 0)
{
ent_angles[0] = 0.0
if(g_decalSwitch[id] == 0) ent_angles[1] -= 90
else ent_angles[1] += 90
entity_set_vector(ent, EV_VEC_origin, ent_origin)
entity_set_vector(ent, EV_VEC_v_angle, ent_angles)
VelocityByAim(ent, 12, velocity)
remove_entity(ent)
}
message_begin(MSG_BROADCAST, SVC_TEMPENTITY, origin)
write_byte(116)
write_coord(origin[0] + floatround(velocity[0]))
write_coord(origin[1] + floatround(velocity[1]))
write_coord(origin[2])
write_byte(decals[g_decalSwitch[id]])
message_end()
g_decalSwitch[id] = 1 - g_decalSwitch[id]
return
}
// The User is Infecting
public zp_user_infected_post(id)
{
g_un_clip[id] = false
g_damage[id] = false
remove_task(id + TASK_AURA)
remove_task(4247545+id)
g_norecoil[id] = false
}
public zp_user_humanized_pre(id)
{
g_un_clip[id] = false
g_damage[id] = false
remove_task(id + TASK_AURA)
remove_task(4247545+id)
g_norecoil[id] = false
}
// User Connect
public client_connect(id)
{
g_un_clip[id] = false
g_isDying[id] = false
g_damage[id] = false
remove_task(id + TASK_AURA)
g_norecoil[id] = false
if(g_isDying[id])
{
g_isDying[id] = false
remove_task(4247545+id)
}
}
// Event Round Start
public event_round_start()
{
for (new id; id <= g_maxplayers; id++)
{
g_un_clip[id] = false
g_damage[id] = false
g_isDying[id] = false
fm_set_rendering(id, kRenderFxNone, 0,0,0,kRenderNormal, 255)
remove_task(id + TASK_AURA)
fm_set_rendering(id, kRenderFxNone, 0,0,0,kRenderNormal, 255)
g_norecoil[id] = false
if(g_isDying[id])
{
g_isDying[id] = false
remove_task(4247545+id)
}
}
}
// Current Weapon info
public Event_CurWeapon(id)
{
if (g_un_clip[id])
{
g_un_clip[id] = true
new uqzWeapon = read_data(2)
if(!(WPN_BS & (1<<uqzWeapon)))
fm_cs_set_weapon_ammo(get_pdata_cbase(id, g_uqz_weapon), g_MaxClips[uqzWeapon])
}
}
// Thanks MasI
public fw_primary_attack(ent)
{
new id = pev(ent,pev_owner)
if(g_norecoil[id])
{
// Get new fire rate
static Float:flRate
flRate = get_pcvar_float(cvar_pattack_rate)
// Set new rates
set_pdata_float(id, m_flNextPrimaryAttack, flRate, 4)
set_pdata_float(id, m_flNextSecondaryAttack, flRate, 4)
set_pdata_float(id, m_flTimeWeaponIdle, flRate, 4)
g_norecoil[id] = true
pev(id, pev_punchangle, Float:{0.0, 0.0, 0.0})
return HAM_IGNORED
}
return HAM_IGNORED
}
// End Thanks MasI
public fw_AWP_PrimaryAttack_Post(awp)
{
static id
id = get_pdata_cbase(awp, m_pPlayer, 4)
if(is_user_connected(id) && g_norecoil[id])
{
// Get new fire rate
static Float:flRate
flRate = get_pcvar_float(cvar_pattack_rate)
// Set new rates
set_pdata_float(awp, m_flNextPrimaryAttack, flRate, 4)
set_pdata_float(awp, m_flNextSecondaryAttack, flRate, 4)
set_pdata_float(awp, m_flTimeWeaponIdle, flRate, 4)
g_norecoil[id] = true
set_pev(id, pev_punchangle, Float:{0.0, 0.0, 0.0})
}
return HAM_IGNORED
}
public zp_round_ended ()
{
for (new id; id <= g_maxplayers; id++)
{
g_un_clip[id] = false
g_damage[id] = false
remove_task(id + TASK_AURA)
g_norecoil[id] = false
if(g_isDying[id])
{
g_isDying[id] = false
remove_task(4247545+id)
}
}
}
///
// Forward Player PreThink
public fw_PlayerPreThink(id)
{
if(g_norecoil[id])
{
message_begin(MSG_ONE_UNRELIABLE, g_msgScreenShake, _, id)
write_short(UNIT_SECOND*10) // amplitude
write_short(UNIT_SECOND*2) // duration
write_short(UNIT_SECOND*5000) // frequency //aqui
message_end()
message_begin(MSG_ONE_UNRELIABLE, gMsgScreenFade, {0,0,0}, id);
write_short( 1<<10 );
write_short( 1<<10 );
write_short( 1<<12 );
write_byte( 225 );
write_byte( 255 );
write_byte( 255 );
write_byte( 50 );
message_end();
}
}
Creditos : Junin
Tópicos semelhantes
» [Extra Item] Modo Ben 10 Versão 1.2
» [Extra Item] Modo Goku
» [Extra Item] Modo Pain
» [Extra Item] Ethereal + Sma
» [ZP] Item Extra : Deadly Shot - Efeito xiter
» [Extra Item] Modo Goku
» [Extra Item] Modo Pain
» [Extra Item] Ethereal + Sma
» [ZP] Item Extra : Deadly Shot - Efeito xiter
Melhores Plugins :: COUNTER-STRIKE 1.6 / CZ :: Plugins Amxmodx :: Plugins [Zombie] :: Plugins Brasileiros
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos