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] Novo Plugin Empty[Pedido] Novo Plugin

more_horiz
Nome Do Plugin: zp_drop_colete
Descrição: É um plugin parecido com pdm.amxx(Dropa Dinheiro(Tecla 'G')) Só que Ao Apertar 'G'  Dropa Colete, ou seja, A Cada vez q Apertarmos o 'G' Irá Cair 100 de Colete no chão ou o tanto q tivermos a menos q isso, nada mais.
De Onde Viu o Plugin: N sei se existe e não ví



OBS: O model do Colete dropado no chão poderia ficar com o 'w_medikit', encontrado em valve/valve/models/w_medikit.

description[Pedido] Novo Plugin EmptyRe: [Pedido] Novo Plugin

more_horiz
Tbm quero

description[Pedido] Novo Plugin EmptyRe: [Pedido] Novo Plugin

more_horiz
Seria uma boa em :)

description[Pedido] Novo Plugin EmptyRe: [Pedido] Novo Plugin

more_horiz
Plugin Entregue !

Versão 4fun:

Código:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <fakemeta>
#include < xs >

#define PLUGIN "Drop Armor"
#define VERSION "1.0"
#define AUTHOR "[P]erfec[T] [S]cr[@]s[H]"

#define fm_create_entity(%1) engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, %1))

new const armor_class[] = "colete"
new const armor_model[] = "models/w_kevlar.mdl"
new const armor_sound[] = "items/tr_kevlar.wav"

public plugin_init() {
   register_plugin(PLUGIN, VERSION, AUTHOR)
   
   register_clcmd("drop", "drop_armor")
   register_forward(FM_Touch, "fwd_Touch")
   register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
}

public plugin_precache()
{
   precache_model(armor_model)
   precache_sound(armor_sound)
}

public event_round_start()
{
   new ent = FM_NULLENT; static string_class[] = "classname"
   while ((ent = engfunc(EngFunc_FindEntityByString, ent, string_class, armor_class)))  set_pev(ent, pev_flags, FL_KILLME);
}

public fwd_Touch(toucher, touched)
{
   if (!is_user_alive(toucher) || !pev_valid(touched)) return FMRES_IGNORED;
   
   new class[32]; pev(touched, pev_classname, class, charsmax(class))

   if (equal(class, armor_class))
   {
      set_user_armor(toucher, get_user_armor(toucher) + 10)
      emit_sound(toucher, CHAN_WEAPON, armor_sound, 1.0, ATTN_NORM, 0, PITCH_NORM)
      
      set_pev(touched, pev_effects, EF_NODRAW)
      set_pev(touched, pev_solid, SOLID_NOT)
      return FMRES_IGNORED
   }
   return FMRES_IGNORED
}

public drop_armor(id)
{
   if(get_user_weapon(id) == CSW_KNIFE && get_user_armor(id) >= 10)
   {
      new Float:Origin[3]
      new Float:vAngle[3]
      new Float:flVelocity[3]
      
      // Get position from eyes
      get_user_eye_position(id, Origin)
      
      pev(id, pev_v_angle, vAngle)
      
      new NewEnt = fm_create_entity("info_target")
      
      set_pev(NewEnt, pev_classname, armor_class)
      
      engfunc(EngFunc_SetModel, NewEnt, armor_model)
      
      set_pev(NewEnt, pev_size, Float:{ -2.0, -2.0, -2.0 }, Float:{ 2.0, 2.0, 2.0 })
         
      set_pev(NewEnt, pev_origin, Origin)
      
      set_pev(NewEnt, pev_solid, SOLID_BBOX)
      
      set_pev(NewEnt, pev_movetype, MOVETYPE_TOSS)
      set_pev(NewEnt, pev_owner, id)
      
      velocity_by_aim(id, 300, flVelocity)
      set_pev(NewEnt, pev_velocity, flVelocity)
      
      set_task(0.3, "unset_owner", NewEnt)
      
      set_user_armor(id, get_user_armor(id) - 10)
   }
}

public unset_owner(ent)
{
   if(!pev_valid(ent)) return PLUGIN_HANDLED
   
   new class[32]; pev(ent, pev_classname, class, charsmax(class))
   if(!equal(class, armor_class)) return PLUGIN_HANDLED;
   
   set_pev(ent, pev_owner, ent)
   
   return PLUGIN_CONTINUE;
}

stock set_user_armor(index, armor) {
   set_pev(index, pev_armorvalue, float(armor));

   return 1;
}

stock get_user_eye_position(id, Float:flOrigin[3])
{
   static Float:flViewOffs[3]
   pev(id, pev_view_ofs, flViewOffs)
   pev(id, pev_origin, flOrigin)
   xs_vec_add(flOrigin, flViewOffs, flOrigin)
}


Versão ZP:

Código:

/* Plugin generated by AMXX-Studio */

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

#define PLUGIN "[ZP] Drop Armor"
#define VERSION "1.0"
#define AUTHOR "[P]erfec[T] [S]cr[@]s[H]"

#define fm_create_entity(%1) engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, %1))

new const armor_class[] = "colete"
new const armor_model[] = "models/w_kevlar.mdl"
new const armor_sound[] = "items/tr_kevlar.wav"

public plugin_init() {
   register_plugin(PLUGIN, VERSION, AUTHOR)
   
   register_clcmd("drop", "drop_armor")
   register_forward(FM_Touch, "fwd_Touch")
   register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
}

public plugin_precache()
{
   precache_model(armor_model)
   precache_sound(armor_sound)
}

public event_round_start()
{
   new ent = FM_NULLENT; static string_class[] = "classname"
   while ((ent = engfunc(EngFunc_FindEntityByString, ent, string_class, armor_class)))  set_pev(ent, pev_flags, FL_KILLME);
}

public fwd_Touch(toucher, touched)
{
   if (!is_user_alive(toucher) || !pev_valid(touched) || zp_get_user_zombie(toucher)) return FMRES_IGNORED;
   
   new class[32]; pev(touched, pev_classname, class, charsmax(class))

   if (equal(class, armor_class))
   {
      set_user_armor(toucher, get_user_armor(toucher) + 10)
      emit_sound(toucher, CHAN_WEAPON, armor_sound, 1.0, ATTN_NORM, 0, PITCH_NORM)
      
      set_pev(touched, pev_effects, EF_NODRAW)
      set_pev(touched, pev_solid, SOLID_NOT)
      return FMRES_IGNORED
   }
   return FMRES_IGNORED
}

public drop_armor(id)
{
   if(get_user_weapon(id) == CSW_KNIFE && get_user_armor(id) >= 10 && !zp_get_user_zombie(id))
   {
      new Float:Origin[3]
      new Float:vAngle[3]
      new Float:flVelocity[3]
      
      // Get position from eyes
      get_user_eye_position(id, Origin)
      
      pev(id, pev_v_angle, vAngle)
      
      new NewEnt = fm_create_entity("info_target")
      
      set_pev(NewEnt, pev_classname, armor_class)
      
      engfunc(EngFunc_SetModel, NewEnt, armor_model)
      
      set_pev(NewEnt, pev_size, Float:{ -2.0, -2.0, -2.0 }, Float:{ 2.0, 2.0, 2.0 })
         
      set_pev(NewEnt, pev_origin, Origin)
      
      set_pev(NewEnt, pev_solid, SOLID_BBOX)
      
      set_pev(NewEnt, pev_movetype, MOVETYPE_TOSS)
      set_pev(NewEnt, pev_owner, id)
      
      velocity_by_aim(id, 300, flVelocity)
      set_pev(NewEnt, pev_velocity, flVelocity)
      
      set_task(0.3, "unset_owner", NewEnt)
      
      set_user_armor(id, get_user_armor(id) - 10)
   }
}

public unset_owner(ent)
{
   if(!pev_valid(ent)) return PLUGIN_HANDLED
   
   new class[32]; pev(ent, pev_classname, class, charsmax(class))
   if(!equal(class, armor_class)) return PLUGIN_HANDLED;
   
   set_pev(ent, pev_owner, ent)
   
   return PLUGIN_CONTINUE;
}

stock set_user_armor(index, armor) {
   set_pev(index, pev_armorvalue, float(armor));

   return 1;
}

stock get_user_eye_position(id, Float:flOrigin[3])
{
   static Float:flViewOffs[3]
   pev(id, pev_view_ofs, flViewOffs)
   pev(id, pev_origin, flOrigin)
   xs_vec_add(flOrigin, flViewOffs, flOrigin)
}

description[Pedido] Novo Plugin EmptyRe: [Pedido] Novo Plugin

more_horiz
Vlw Perfect Scrash, xD

description[Pedido] Novo Plugin EmptyRe: [Pedido] Novo Plugin

more_horiz
@Closed

description[Pedido] Novo Plugin EmptyRe: [Pedido] Novo Plugin

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