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


descriptionPedido de ajuda para limitar bomba ( campo de força ) EmptyPedido de ajuda para limitar bomba ( campo de força )

more_horiz
Ola galera da zplague gostaria que alguem de vocês me ajuda-se a limita 1 bomba em meu servidor.

ela se chama Campo de proteção.

o nome do pluggin e este.

zp50_forcefield_grenade.amx

descriptionPedido de ajuda para limitar bomba ( campo de força ) EmptyRe: Pedido de ajuda para limitar bomba ( campo de força )

more_horiz
Simples meu amigo , Bastá pegar a sma desse plugin e nela editar o tempo que você querer , caso Não saiba editar plugin fale comigo.

descriptionPedido de ajuda para limitar bomba ( campo de força ) EmptyRe: Pedido de ajuda para limitar bomba ( campo de força )

more_horiz
Vampery = Aeronalta !

descriptionPedido de ajuda para limitar bomba ( campo de força ) EmptyRe: Pedido de ajuda para limitar bomba ( campo de força )

more_horiz
zumbmod escreveu:
Vampery = Aeronalta !

Provas = Ban nele
;D

descriptionPedido de ajuda para limitar bomba ( campo de força ) EmptyRe: Pedido de ajuda para limitar bomba ( campo de força )

more_horiz
a sma do pluggin e essa.


#include
#include
#include
#include
#include
#include < fun >
#include
#include
#include

#define PLUGIN "[ZP] Forcefield Grenade"
#define VERSION "21.01.2013"
#define AUTHOR "AMXX Dev"

#define ValidTouch(%1) ( is_user_alive(%1) && zp_core_is_zombie(%1) )

new const NADE_TYPE_CAMPO = 3679

new Float:CampoColors[3] =
{
0.0 , // r
220.0 , // g
255.0 // b
}

new const model_grenade[] = "models/zombie_plague/v_auragren.mdl"
new const model[] = "models/zombie_plague/aura8.mdl"
new const w_model[] = "models/zombie_plague/w_aura.mdl"
new const sprite_grenade_trail[] = "sprites/laserbeam.spr"
new const entclas[] = "campo_grenade_forze"

new g_trailSpr, g_SayText, g_itemID

new bool:g_bomb[33]

const item_cost = 60

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

RegisterHam(Ham_Think, "grenade", "fw_ThinkGrenade")
RegisterHam(Ham_Killed, "player", "fw_PlayerKilled")
RegisterHam(Ham_Item_Deploy, "weapon_smokegrenade", "shield_deploy", 1)

register_forward(FM_SetModel, "fw_SetModel")
register_forward(FM_Touch, "fw_touch")

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

// G1
register_logevent("logevent_Round_End", 2, "1=Round_End");

g_SayText = get_user_msgid("SayText")

g_itemID = zp_items_register("Forcefield Nade (15 seconds)", item_cost)
}

public event_round_start()
arrayset(g_bomb, false, 33)

public plugin_precache() {

g_trailSpr = engfunc(EngFunc_PrecacheModel, sprite_grenade_trail)
engfunc(EngFunc_PrecacheModel, model_grenade)
engfunc(EngFunc_PrecacheModel, model)
engfunc(EngFunc_PrecacheModel, w_model)
}

public client_disconnect(id)
g_bomb[id] = false

public zp_fw_items_select_pre(player, itemid)
{
if(itemid != g_itemID)
return ZP_ITEM_AVAILABLE

if(zp_core_is_zombie(player))
return ZP_ITEM_DONT_SHOW

if(g_bomb[player])
return ZP_ITEM_NOT_AVAILABLE

return ZP_ITEM_AVAILABLE
}

public zp_fw_items_select_post(player, itemid)
{
if(itemid != g_itemID)
return

g_bomb[player] = true

if(get_user_weapon(player) == CSW_SMOKEGRENADE)
{
engclient_cmd(player, "weapon_knife")
engclient_cmd(player, "weapon_smokegrenade")
}

if(user_has_weapon(player, CSW_SMOKEGRENADE))
cs_set_user_bpammo(player, CSW_SMOKEGRENADE, cs_get_user_bpammo(player, CSW_SMOKEGRENADE) + 1)
else
give_item(player, "weapon_smokegrenade")

engclient_cmd(player, "weapon_smokegrenade")
}

public fw_PlayerKilled(victim, attacker, shouldgib)
g_bomb[victim] = false

public fw_ThinkGrenade(entity)
{
if(!pev_valid(entity))
return HAM_IGNORED

static Float:dmgtime
pev(entity, pev_dmgtime, dmgtime)

if (dmgtime > get_gametime())
return HAM_IGNORED

if(pev(entity, pev_flTimeStepSound) == NADE_TYPE_CAMPO)
crear_ent(entity)

return HAM_SUPERCEDE
}

public fw_SetModel(entity, const model[])
{
static Float:dmgtime
pev(entity, pev_dmgtime, dmgtime)

if (dmgtime == 0.0)
return FMRES_IGNORED

if (equal(model[7], "w_sm", 4))
{
new owner = pev(entity, pev_owner)

if(is_user_alive(owner) && !zp_core_is_zombie(owner) && g_bomb[owner])
{
fm_set_rendering(entity, kRenderFxGlowShell, 000, 255, 255, kRenderNormal, 16)

message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(TE_BEAMFOLLOW) // TE id
write_short(entity) // entity
write_short(g_trailSpr) // sprite
write_byte(10) // life
write_byte(10) // width
write_byte(000) // r
write_byte(255) // g
write_byte(255) // b
write_byte(500) // brightness
message_end()

set_pev(entity, pev_flTimeStepSound, NADE_TYPE_CAMPO)

set_task(6.0, "DeleteEntityGrenade" ,entity)
entity_set_model(entity, w_model)

g_bomb[owner] = false

if(cs_get_user_bpammo(owner, CSW_SMOKEGRENADE) > 1)
{
engclient_cmd(owner, "weapon_knife")
engclient_cmd(owner, "weapon_smokegrenade")
}

return FMRES_SUPERCEDE
}
}
return FMRES_IGNORED

}

public DeleteEntityGrenade(entity)
remove_entity(entity)

public crear_ent(id)
{
new iEntity = create_entity("info_target")

if(!is_valid_ent(iEntity))
return PLUGIN_HANDLED

new Float: Origin[3]
entity_get_vector(id, EV_VEC_origin, Origin)

entity_set_string(iEntity, EV_SZ_classname, entclas)

entity_set_vector(iEntity,EV_VEC_origin, Origin)
entity_set_model(iEntity,model)
entity_set_int(iEntity, EV_INT_solid, SOLID_TRIGGER)
entity_set_size(iEntity, Float: {-100.0, -100.0, -100.0}, Float: {100.0, 100.0, 100.0})
entity_set_int(iEntity, EV_INT_renderfx, kRenderFxGlowShell)
entity_set_int(iEntity, EV_INT_rendermode, kRenderTransAlpha)
entity_set_float(iEntity, EV_FL_renderamt, 50.0)

entity_set_vector(iEntity, EV_VEC_rendercolor, CampoColors)

set_task(15.0, "DeleteEntity", iEntity)

return PLUGIN_CONTINUE
}

public zp_fw_core_infect_post(infected)
{
if (g_bomb[infected])
g_bomb[infected] = false
}

public fw_touch(ent, touched)
{
if (!pev_valid(ent))
return FMRES_IGNORED

static entclass[32]
pev(ent, pev_classname, entclass, 31)

if (equali(entclass, entclas))
{
if(ValidTouch(touched))
{
new Float:pos_ptr[3], Float:pos_ptd[3], Float:push_power = 7.5

pev(ent, pev_origin, pos_ptr)
pev(touched, pev_origin, pos_ptd)

for(new i = 0; i < 3; i++)
{
pos_ptd[i] -= pos_ptr[i]
pos_ptd[i] *= push_power
}
set_pev(touched, pev_velocity, pos_ptd)
set_pev(touched, pev_impulse, pos_ptd)
}
}
return PLUGIN_HANDLED
}

public logevent_Round_End() {
set_task(0.1, "DeleteEntity", iEntity)

return PLUGIN_CONTINUE;
}

public remove_ent()
{
remove_entity_name(entclas)
}

public DeleteEntity(entity)
{
if(is_valid_ent(entity))
remove_entity(entity)
}

stock Color(const id, const input[], any:...)
{
static msg[191]
vformat(msg, 190, input, 3)

replace_all(msg, 190, "!g", "^4")
replace_all(msg, 190, "!y", "^1")
replace_all(msg, 190, "!t", "^3")

message_begin(MSG_ONE_UNRELIABLE, g_SayText, _, id)
write_byte(id)
write_string(msg)
message_end()
}

public shield_deploy(shield_ent)
{
if(pev_valid(shield_ent) != 2)
return HAM_IGNORED

new id = get_pdata_cbase(shield_ent, 41, 4)

if(g_bomb[id] && !zp_core_is_zombie(id))
set_pev(id, pev_viewmodel2, model_grenade)

return HAM_IGNORED
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang2057\\ f0\\ fs16 \n\\ par }
*/

descriptionPedido de ajuda para limitar bomba ( campo de força ) EmptyRe: Pedido de ajuda para limitar bomba ( campo de força )

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