Nome de Plugin : Multijump Para VIPs
Descrição Plugin : Vips Tem 1 MultiJump Gratis Todos Rounds
Onde Você Vio Plugin : DH
SMA:
-------------------------------------------------------------------------------
Nome Plugin : Carniceiro + Faca Rapida + Visão Noturna
Descrição Plugin : Carniceiro que da aura , Faca Rapida e Visão Noturna
Onde Você Vio Plugin : Não Lembro
Ja tenho Uma SMA so Presisa Colocar NightVision
Descrição Plugin : Vips Tem 1 MultiJump Gratis Todos Rounds
Onde Você Vio Plugin : DH
SMA:
Código:
/*================================================================================
[Plugin Customization]
=================================================================================*/
new const g_item_name[] = { "Multijump (+1)" };
const g_item_cost = 5;
new g_maxJumps = 0;
/*============================================================================*/
new jumpnum[33] = 0;
new bool:dojump[33] = false;
new g_itemid_multijump;
new g_multijumps[33] = 0;
public plugin_init()
{
register_plugin("[ZP] Extra Item: Multijump", "1.0", "pharse");
g_itemid_multijump = zp_register_extra_item(g_item_name, g_item_cost, ZP_TEAM_HUMAN);
register_forward(FM_PlayerPreThink, "FW_PlayerPreThink");
register_forward(FM_PlayerPostThink, "FW_PlayerPostThink");
register_event("HLTV", "EVENT_round_start", "a", "1=0", "2=0");
}
public FW_PlayerPreThink(id)
{
if(!is_user_alive(id) || zp_get_user_zombie(id) || !g_multijumps[id]) return PLUGIN_CONTINUE
new nbut = pev(id,pev_button);
new obut = pev(id,pev_oldbuttons);
if((nbut & IN_JUMP) && !(pev(id,pev_flags) & FL_ONGROUND) && !(obut & IN_JUMP))
{
if(jumpnum[id] < g_multijumps[id])
{
dojump[id] = true;
jumpnum[id]++;
return PLUGIN_CONTINUE
}
}
if((nbut & IN_JUMP) && (pev(id,pev_flags) & FL_ONGROUND))
{
jumpnum[id] = 0;
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE
}
public FW_PlayerPostThink(id)
{
if(!is_user_alive(id) || zp_get_user_zombie(id) || !g_multijumps[id]) return PLUGIN_CONTINUE
if(dojump[id] == true)
{
new Float:velocity[3];
pev(id,pev_velocity,velocity);
velocity[2] = random_float(265.0,285.0);
set_pev(id,pev_velocity,velocity)
dojump[id] = false
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE
}
// Player buys our upgrade, add one multijump
public zp_extra_item_selected(player, itemid)
{
if (itemid == g_itemid_multijump){
if (g_multijumps[player] < g_maxJumps || !g_maxJumps){
g_multijumps[player]++;
if (g_maxJumps)
client_print(player, print_center, "Agora voce pula %d / %d vezes no ar", g_multijumps[player], g_maxJumps);
else
client_print(player, print_center, "Agora voce pula %d vezes no ar", g_multijumps[player]);
}
else
client_print(player, print_center, "Voce nao pode pular mais que %d vezes no ar .", g_maxJumps);
}
}
// Reset multijump for all players on newround
public EVENT_round_start()
{
for (new id; id <= 32; id++) g_multijumps[id] = false;
}
-------------------------------------------------------------------------------
Nome Plugin : Carniceiro + Faca Rapida + Visão Noturna
Descrição Plugin : Carniceiro que da aura , Faca Rapida e Visão Noturna
Onde Você Vio Plugin : Não Lembro
Ja tenho Uma SMA so Presisa Colocar NightVision
Código:
#include <amxmodx>
#include <fakemeta>
#include <fakemeta_util>
#include <hamsandwich>
#include <zombieplague>
/*================================================================================
[Plugin Customization]
=================================================================================*/
new const g_item_name[] = { "Carniceiro" }
const g_item_cost = 50
new const g_sound_buyarmor[] = { "items/tr_kevlar.wav" }
const g_armor_amount = 500
const g_armor_limit = 500
const OFFSET_WEAPONOWNER = 41
const OFFSET_LINUX_WEAPONS = 4
const m_flNextPrimaryAttack = 46
const m_flNextSecondaryAttack = 47
#define TASK_AURA 27000
#define IsValidUser(%1) (1 <= %1 <= g_maxplayers)
new g_hasCarniceiro[33], g_maxplayers, cvar_color, cvar_size, cvar_glowcolor, cvar_Primary, cvar_Secondary, cvar_PrimarySpeed, cvar_SecondarySpeed, cvar_dmgmultiplier
/*============================================================================*/
// Item IDs
new g_itemid_humanarmor
public plugin_init()
{
register_plugin("[ZP] Extra: Carniceiro", "1.0", "PrinTT/[P]erfec[T] [S]cr[@]s[H]/Wilian")
g_itemid_humanarmor = zp_register_extra_item(g_item_name, g_item_cost, ZP_TEAM_HUMAN)
RegisterHam(Ham_Weapon_PrimaryAttack, "weapon_knife", "fwd_Knife_PriAtk_Post", 1)
RegisterHam(Ham_Weapon_SecondaryAttack, "weapon_knife", "fwd_Knife_SecAtk_Post", 1)
RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")
register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
g_maxplayers = get_maxplayers()
cvar_color = register_cvar("zp_carniceiro_aura_rgb", "60 160 225")
cvar_size = register_cvar("zp_carniceiro_aura_size", "20")
cvar_glowcolor = register_cvar("zp_carniceiro_glow_color_rgb", "60 160 225")
cvar_Primary = register_cvar("zp_carniceiro_pri", "1")
cvar_PrimarySpeed = register_cvar("zp_carniceiro_pri_speed", "0.33")
cvar_Secondary = register_cvar("zp_carniceiro_sec", "1")
cvar_SecondarySpeed = register_cvar("zp_carniceiro_sec_speed", "0.33")
cvar_dmgmultiplier = register_cvar("zp_carniceiro_knife_dmg", "4")
}
public plugin_precache()
{
precache_sound(g_sound_buyarmor)
}
/*===============================================================================
[Prevenção de Bugs]
=================================================================================*/
// Ao comecar o round
public event_round_start()
{
for (new id; id <= g_maxplayers; id++)
{
// Removemos a aura
remove_task(id + TASK_AURA)
}
for (new id = 1; id <= g_maxplayers; id++)
{
g_hasCarniceiro[id] = false
}
}
// Se o jogador desconecta
public client_disconnect(id)
{
remove_task(id + TASK_AURA)
g_hasCarniceiro[id] = false
}
// Se o jogador virar Nemesis ou Assassino
public zp_user_infected_pre(id)
{
g_hasCarniceiro[id] = false
remove_task(id + TASK_AURA)
}
// Se virar zombie
public zp_user_infected_post(id, infector)
{
remove_task(id + TASK_AURA)
g_hasCarniceiro[id] = false
}
// Se o jogador usar um antidoto
public zp_user_humanized_post(id, human)
{
remove_task(id + TASK_AURA)
g_hasCarniceiro[id] = false
}
// Se o jogador virar Survivor ou Sniper
public zp_user_humanized_pre(id)
{
if (g_hasCarniceiro[id])
{
g_hasCarniceiro[id] = false
remove_task(id + TASK_AURA)
}
}
/*===============================================================================
[Ações ao Selecionar o Item]
=================================================================================*/
public zp_extra_item_selected(id, itemid)
{
if (itemid == g_itemid_humanarmor)
{
// Colocamos o task que lhe dara a aura.
set_task(0.1, "aura", id + TASK_AURA, _, _, "b")
client_printcolor(id, "!g[ZP]!y Voce comprou !tCarniceiro. !g[+500 Colete +Faca rapida]")
g_hasCarniceiro[id] = true
// Codigo do Glow soh o renderning ja bastava mas como quero de cvar cor a cor entao ta o codigo ai
new szGlowColors[16]
get_pcvar_string(cvar_glowcolor, szGlowColors, 15)
new gGlowRed[4], gGlowGreen[4], gGlowBlue[4], iGlowRed, iGlowGreen, iGlowBlue
parse(szGlowColors, gGlowRed, 3, gGlowGreen, 3, gGlowBlue, 3)
iGlowRed = clamp(str_to_num(gGlowRed), 0, 255)
iGlowGreen = clamp(str_to_num(gGlowGreen), 0, 255)
iGlowBlue = clamp(str_to_num(gGlowBlue), 0, 255)
fm_set_rendering(id, kRenderFxGlowShell, iGlowRed, iGlowGreen, iGlowBlue, kRenderNormal, 16)
// Se for nemesis desativa a aura
if(zp_get_user_nemesis(id))
{
remove_task(id + TASK_AURA)
}
set_pev(id, pev_armorvalue, float(min(pev(id, pev_armorvalue)+g_armor_amount, g_armor_limit)))
engfunc(EngFunc_EmitSound, id, CHAN_BODY, g_sound_buyarmor, 1.0, ATTN_NORM, 0, PITCH_NORM)
}
}
/*===============================================================================
[O Bang que dara Aura e Faca Rapida]
=================================================================================*/
public fwd_Knife_PriAtk_Post(ent)
{
if (!get_pcvar_num(cvar_Primary))
return HAM_IGNORED;
static owner
owner = ham_cs_get_weapon_ent_owner(ent)
if (!g_hasCarniceiro[owner])
return HAM_IGNORED
static Float:Speed, Float:Primary, Float:Secondary
Speed = get_pcvar_float(cvar_PrimarySpeed)
Primary = get_pdata_float(ent, m_flNextPrimaryAttack, OFFSET_LINUX_WEAPONS) * Speed
Secondary = get_pdata_float(ent, m_flNextSecondaryAttack, OFFSET_LINUX_WEAPONS) * Speed
if (Primary > 0.0 && Secondary > 0.0)
{
set_pdata_float(ent, m_flNextPrimaryAttack, Primary, OFFSET_LINUX_WEAPONS)
set_pdata_float(ent, m_flNextSecondaryAttack, Secondary, OFFSET_LINUX_WEAPONS)
}
return HAM_IGNORED;
}
public fwd_Knife_SecAtk_Post(ent)
{
if (!get_pcvar_num(cvar_Secondary))
return HAM_IGNORED;
static owner
owner = ham_cs_get_weapon_ent_owner(ent)
if (!g_hasCarniceiro[owner])
return HAM_IGNORED
static Float:Speed, Float:Primary, Float:Secondary
Speed = get_pcvar_float(cvar_SecondarySpeed)
Primary = get_pdata_float(ent, m_flNextPrimaryAttack, OFFSET_LINUX_WEAPONS) * Speed
Secondary = get_pdata_float(ent, m_flNextSecondaryAttack, OFFSET_LINUX_WEAPONS) * Speed
if (Primary > 0.0 && Secondary > 0.0)
{
set_pdata_float(ent, m_flNextPrimaryAttack, Primary, OFFSET_LINUX_WEAPONS)
set_pdata_float(ent, m_flNextSecondaryAttack, Secondary, OFFSET_LINUX_WEAPONS)
}
return HAM_IGNORED;
}
public fw_TakeDamage(victim, inflictor, attacker, Float:damage)
{
if ( IsValidUser( attacker ) && get_user_weapon(attacker) == CSW_KNIFE && g_hasCarniceiro[attacker] )
{
SetHamParamFloat(4, damage * get_pcvar_float( cvar_dmgmultiplier ) )
}
}
public aura(id)
{
id -= TASK_AURA
if (!is_user_alive(id))
return
// Codigo de kiske para passar de cvar a cor
new szColors[16]
get_pcvar_string(cvar_color, szColors, 15)
new gRed[4], gGreen[4], gBlue[4], iRed, iGreen, iBlue
parse(szColors, gRed, 3, gGreen, 3, gBlue, 3)
iRed = clamp(str_to_num(gRed), 0, 255)
iGreen = clamp(str_to_num(gGreen), 0, 255)
iBlue = clamp(str_to_num(gBlue), 0, 255)
//
static Float:FOrigin[3]
pev(id, pev_origin, FOrigin)
engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, FOrigin, 0)
write_byte(TE_DLIGHT)
engfunc(EngFunc_WriteCoord, FOrigin[0])
engfunc(EngFunc_WriteCoord, FOrigin[1])
engfunc(EngFunc_WriteCoord, FOrigin[2])
write_byte(get_pcvar_num(cvar_size)) // Tamaño
write_byte(iRed) // R
write_byte(iGreen) // G
write_byte(iBlue) // B
write_byte(2)
write_byte(0)
message_end()
}
/*===============================================================================
[Mensagem Colorida (client_printcolor)]
=================================================================================*/
stock client_printcolor(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)
replace_all(msg, 190, "!g", "^4") // Chat Verde
replace_all(msg, 190, "!y", "^1") // Chat Normal
replace_all(msg, 190, "!t", "^3") // Chat Do Time Tr=Vermelho Ct=Azul Spec=Branco
if (id) players[0] = id; else get_players(players, count, "ch")
{
for (new i = 0; i < count; i++)
{
if (is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}
stock ham_cs_get_weapon_ent_owner(entity)
{
return get_pdata_cbase(entity, OFFSET_WEAPONOWNER, OFFSET_LINUX_WEAPONS);
}