Raised This Month: $32 Target: $400
 8% 

Biohazard v2.00 Beta 3b (Zombie Mod)


Post New Thread Reply   
 
Thread Tools Display Modes
warprof
Junior Member
Join Date: Jun 2009
Location: Belarus
Old 08-23-2015 , 21:56   Re: Biohazard v2.00 Beta 3b (Zombie Mod)
Reply With Quote #4051

Where i can take longjump for first zombie? And random Zombie models. Thanx!

Last edited by warprof; 08-23-2015 at 22:54.
warprof is offline
alexclaudiu2003
Senior Member
Join Date: Aug 2011
Location: Romania
Old 10-26-2015 , 14:01   Re: Biohazard v2.00 Beta 3b (Zombie Mod)
Reply With Quote #4052

Hello, this plugin crash my server

PHP Code:
#include <amxmodx>
#include <biohazard>
#include <fakemeta>
#include <fakemeta_util>
#include <hamsandwich>
#define PLUGIN  "[Bio] Zombie: Finger"
#define AUTHOR  "Aragon*"
#define VERSION "1.0"
#define ZOMBIE_NAME "Finger (Run)"     //Zombie Name
#define ZOMBIE_DESC "press G Run" //Zobmie Description
#define ZOMBIE_MODEL "models/player/bio30_finger/bio30_finger.mdl"     //Zombie Model
#define ZOMBIE_CLAWS "models/player/bio30_finger/claws_finger.mdl" //Claws Model
#define ZOMBIE_HEALTH  555.0 //Health value
#define ZOMBIE_SPEED  300.0 //Speed value
#define ZOMBIE_GRAVITY  1.0 //Gravity multiplier
#define ZOMBIE_ATTACK  1.5 //Zombie damage multiplier
#define ZOMBIE_REGENDLY  0.25 //Regeneration delay value
#define ZOMBIE_KNOCKBACK 0.0 //Knockback multiplier
#define TASKID_FASTRUN_HEARTBEAT 12314
#define TASKID_START_POWER  2131
new FastRun_Sound[][] = {
 
"Biohazard30/bio30_finger/pukricide.wav"
}
new const 
Tag[  ] = "[Biohazard]";
new Class, 
FastRun[33], FastRun_Countdown[33]
new 
cvar_fastrun_durationcvar_fastrun_countdowncvar_fastrun_speed;
public 
plugin_init() {         
 
register_plugin(PLUGIN,AUTHOR,VERSION)
 
is_biomod_active() ? plugin_init2() : pause("ad")
}
public 
plugin_init2() {
 Class = 
register_class(ZOMBIE_NAMEZOMBIE_DESC )
 
 
set_class_pmodel(Class, ZOMBIE_MODEL)
 
set_class_wmodel(Class, ZOMBIE_CLAWS)
 
 
set_class_data(Class, DATA_HEALTHZOMBIE_HEALTH);
 
set_class_data(Class, DATA_SPEEDZOMBIE_SPEED);
 
set_class_data(Class, DATA_GRAVITYZOMBIE_GRAVITY);
 
set_class_data(Class, DATA_ATTACKZOMBIE_ATTACK);
 
set_class_data(Class, DATA_REGENDLYZOMBIE_REGENDLY);
 
set_class_data(Class, DATA_KNOCKBACKZOMBIE_KNOCKBACK);
 
 
register_clcmd"drop""CMD_FastRun");
 
 
register_event("DeathMsg""EVENT_Death""a")
 
 
register_forward(FM_PlayerPreThink,"FWD_PlayerPreThink")
 
 
RegisterHam(Ham_Spawn"player""HAM_Spawn_Post"1);
 
 
cvar_fastrun_duration register_cvar("bio_fastrun_duration""13.0")
 
cvar_fastrun_countdown register_cvar("bio_fastrun_countdown""7.0")
 
cvar_fastrun_speed register_cvar("bio_fastrun_speed""500.0")  
}
public 
plugin_precache() {
 
precache_model(ZOMBIE_CLAWS)
 
precache_model(ZOMBIE_MODEL)
 
 for(new 
0sizeof FastRun_Soundi++ )
  
precache_sound(FastRun_Sound[i]);
}
public 
client_disconect(id)
{
         
remove_task(id TASKID_FASTRUN_HEARTBEAT)
    
remove_task(id)
}
public 
EVENT_Death() {
 
FastRun[read_data(2)] = 0
 FastRun_Countdown
[read_data(2)] = 0
 remove_task
(read_data(2) + TASKID_FASTRUN_HEARTBEAT)
}
public 
event_infect(victimattacker) {
 if(
get_user_class(victim) == Class) {
  
FastRun[victim] = 0
  FastRun_Countdown
[victim] = 0
  remove_task
(victim TASKID_FASTRUN_HEARTBEAT)
  
ColorChat(victim"^x04%s^x01 Pentru a folosi^x03 ultra viteza^x01 apasa tasta^x03 G^x01."Tag)
 }
}
public 
FWD_PlayerPreThink(id) {
 if(
is_user_alive(id) && FastRun[id]) {
  if(
fm_get_user_maxspeed(id) < get_pcvar_float(cvar_fastrun_speed) && fm_get_user_maxspeed(id) > 1.0)
   
fm_set_user_maxspeed(idget_pcvar_float(cvar_fastrun_speed))
 }
 if(
get_user_weapon(id) != CSW_KNIFE && task_exists(id TASKID_START_POWER))
  
remove_task(id TASKID_START_POWER)
}
public 
HAM_Spawn_Post(id) { 
 
FastRun[id] = 0
 FastRun_Countdown
[id] = 0
 remove_task
(id TASKID_FASTRUN_HEARTBEAT)
}
public 
CMD_FastRun(id) {
 new 
Float:NextAttack get_pdata_float(id835);
 if(
is_user_alive(id) && get_user_class(id) == Class && is_user_zombie(id) && get_user_weapon(id) == CSW_KNIFE && NextAttack <= 0.0) {
  if(!
FastRun[id] && !FastRun_Countdown[id]) {
   
set_pdata_float(id831.65);
   
set_weapon_anim(id9)
   
set_task(1.50"StartRun"id TASKID_START_POWER);
  }
  return 
PLUGIN_HANDLED
 
}
 return 
PLUGIN_CONTINUE
}
public 
StartRun(id) {
 
id -= TASKID_START_POWER
 
 
if(!is_user_connected(id))
 {
     return;
 }
 
engclient_cmd(id"weapon_knife");
 
set_pdata_float(id831.565);
 
set_weapon_anim(id10)
 
EffectFastrun(id95)
 
emit_sound(idCHAN_VOICEFastRun_Sound[0], 1.0ATTN_NORM0PITCH_NORM)
 
set_task(2.0"FastRunHeartBeat"id TASKID_FASTRUN_HEARTBEAT__"b")
 
FastRun[id] = get_pcvar_num(cvar_fastrun_duration);
 
 if(
FastRun[id]) {
  new 
Message[256];
  
formatex(Message,sizeof(Message)-1,"Fast Run^n(%d second%s remaining).",FastRun[id], FastRun[id] > "s" "");
  
  
HudMessage(idMessage_______0.9);
  
set_task(1.0"TASK_CountDown"id);
 }
}
public 
TASK_CountDown(id) {
 if (!
is_user_alive(id) || !is_user_zombie(id) || get_user_class(id) != Class) {
  
FastRun[id] = 0
 
}
 else if(
is_user_alive(id) && FastRun[id] > 1) {
  
FastRun[id] --;
  new 
Message[256];
  
formatex(Message,sizeof(Message)-1,"Fast Run^n(%d second%s remaining).",FastRun[id], FastRun[id] > "s" "");
  
  
HudMessage(idMessage_______0.9);
  
set_task(1.0"TASK_CountDown"id);
 }
 else if(
FastRun[id] <= 1) {
  
FastRun[id] = 0
  remove_task
(id TASKID_FASTRUN_HEARTBEAT)
  
fm_set_user_maxspeed(idZOMBIE_SPEED)
  
EffectFastrun(id)
  
  
FastRun_Countdown[id] = get_pcvar_num(cvar_fastrun_countdown)
  
  if(
FastRun_Countdown[id]) {
   new 
Message[256];
   
formatex(Message,sizeof(Message)-1,"Fast Run not ready.^n(%d second%s remaining).",FastRun_Countdown[id], FastRun_Countdown[id] > "s" "");
   
   
HudMessage(idMessage_______0.9);
   
set_task(1.0"TASK_CountDown2"id);
  }
 }
}
public 
TASK_CountDown2(id) {
 if (!
is_user_alive(id) || !is_user_zombie(id) || get_user_class(id) != Class)
  
FastRun_Countdown[id] = 0
 
else if(is_user_alive(id) && FastRun_Countdown[id] > 1) {
  
FastRun_Countdown[id] --;
  new 
Message[256];
  
formatex(Message,sizeof(Message)-1,"Fast Run not ready.^n(%d second%s remaining).",FastRun_Countdown[id], FastRun_Countdown[id] > "s" "");
  
  
HudMessage(idMessage_______0.9);
  
set_task(1.0"TASK_CountDown2"id);
 }
 else if(
FastRun_Countdown[id] <= 1) {
  new 
Message[256];
  
formatex(Message,sizeof(Message)-1,"Fast Run is ready.");
  
  
HudMessage(idMessage_______0.9);
  
FastRun_Countdown[id] = 0;
 }
}
public 
FastRunHeartBeat(id) {
 
id -= TASKID_FASTRUN_HEARTBEAT
 
 
if (is_user_connected(id) && FastRun[id]) 
 {
   
emit_sound(idCHAN_VOICEFastRun_Sound[random_num(1sizeof FastRun_Sound 1)], 1.0ATTN_NORM0PITCH_NORM)
  
   new 
Color[3]
   
Color[0] = 200
   Color
[1] = 0
   Color
[2] = 0
   
   UTIL_ScreenFade
(idColor0.50.5125)
   
 }
}
EffectFastrun(idnum 90) {
 if(
is_user_connected(id)) {
  
message_begin(MSG_ONEget_user_msgid("SetFOV"), {0,0,0}, id)
  
write_byte(num)
  
message_end()
 }
}
stock FixedUnsigned16(Float:flValueiScale) {
 new 
iOutput;
 
 
iOutput floatround(flValue iScale);
 if ( 
iOutput )
  
iOutput 0;
 
 if ( 
iOutput 0xFFFF )
  
iOutput 0xFFFF;
 return 
iOutput;
}
stock UTIL_ScreenFade(id=0,iColor[3]={0,0,0},Float:flFxTime=-1.0,Float:flHoldTime=0.0,iAlpha=0,iFlags=0x0000,bool:bReliable=false,bool:bExternal=false) {
 if( 
id && !is_user_connected(id))
  return;
 
 new 
iFadeTime;
 if( 
flFxTime == -1.0 ) {
  
iFadeTime 4;
 }
 else {
  
iFadeTime FixedUnsigned16flFxTime 1<<12 );
 }
 
 static 
gmsgScreenFade;
 if( !
gmsgScreenFade ) {
  
gmsgScreenFade get_user_msgid("ScreenFade");
 }
 
 new 
MSG_DEST;
 if( 
bReliable ) {
  
MSG_DEST id MSG_ONE MSG_ALL;
 }
 else {
  
MSG_DEST id MSG_ONE_UNRELIABLE MSG_BROADCAST;
 }
 
 if( 
bExternal ) {
  
emessage_beginMSG_DESTgmsgScreenFade_id );
  
ewrite_shortiFadeTime );
  
ewrite_shortFixedUnsigned16flHoldTime 1<<12 ) );
  
ewrite_shortiFlags );
  
ewrite_byteiColor[0] );
  
ewrite_byteiColor[1] );
  
ewrite_byteiColor[2] );
  
ewrite_byteiAlpha );
  
emessage_end();
 }
 else {
  
message_beginMSG_DESTgmsgScreenFade_id );
  
write_shortiFadeTime );
  
write_shortFixedUnsigned16flHoldTime 1<<12 ) );
  
write_shortiFlags );
  
write_byteiColor[0] );
  
write_byteiColor[1] );
  
write_byteiColor[2] );
  
write_byteiAlpha );
  
message_end();
 }
}
stock UTIL_FadeToBlack(id,Float:fxtime=3.0,bool:bReliable=false,bool:bExternal=false) {
 
UTIL_ScreenFade(id_fxtimefxtime2550x0001|0x0004,bReliable,bExternal);
}
stock set_weapon_anim(idanim) {
 
set_pev(idpev_weaponanimanim);
 if(
is_user_connected(id)) {
  
message_begin(MSG_ONESVC_WEAPONANIM_id);
  
write_byte(anim);
  
write_byte(pev(idpev_body));
  
message_end();
 }
}
#define clamp_byte(%1)       ( clamp( %1, 0, 255 ) )
#define pack_color(%1,%2,%3) ( %3 + ( %2 << 8 ) + ( %1 << 16 ) )
stock HudMessage(const id, const message[], red 0green 160blue 0Float:= -1.0Float:0.65effects 2Float:fxtime 0.01Float:holdtime 3.0Float:fadeintime 0.01Float:fadeouttime 0.01) {
 new 
count 1players[32];
 
 if(
idplayers[0] = id;
 else 
get_players(playerscount"ch"); {
  for(new 
0counti++) {
   if(
is_user_connected(players[i])) { 
    new 
color pack_color(clamp_byte(red), clamp_byte(green), clamp_byte(blue))
    
    
message_begin(MSG_ONE_UNRELIABLESVC_DIRECTOR_players[i]);
    
write_byte(strlen(message) + 31);
    
write_byte(DRC_CMD_MESSAGE);
    
write_byte(effects);
    
write_long(color);
    
write_long(_:x);
    
write_long(_:y);
    
write_long(_:fadeintime);
    
write_long(_:fadeouttime);
    
write_long(_:holdtime);
    
write_long(_:fxtime);
    
write_string(message);
    
message_end();
   }
  }
 }
}
stock ColorChat(const id, const input[], any:...) {
 new 
count 1players[32];
 static 
msg[191];
 
vformat(msg190input3);
 
 
replace_all(msg190"!g""^4");
 
replace_all(msg190"!y""^1");
 
replace_all(msg190"!t""^3");
 
 if(
idplayers[0] = id;
 else 
get_players(playerscount"ch"); {
  for(new 
0counti++) {
   if(
is_user_connected(players[i])) {
    
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players[i]);
    
write_byte(players[i]);
    
write_string(msg);
    
message_end();
   }
  }
 } 
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1049\\ f0\\ fs16 \n\\ par }
*/ 
Run time error 4: index out of bounds
bio_zombie_finger2.sma::FastRunHeartBeat (line 182)
Displaying debug trace (plugin "bio_zombie_finger2.amxx")

Help, please.
alexclaudiu2003 is offline
Kimera
Junior Member
Join Date: May 2013
Old 12-13-2015 , 13:56   Re: Biohazard v2.00 Beta 3b (Zombie Mod)
Reply With Quote #4053

CS 1.6 crash

Log error:

L 12/13/2015 - 16:49:06: [AMXX] Run time error 10 (plugin "biohazard.amxx") (native "dllfunc") - debug not enabled!
Kimera is offline
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 12-15-2015 , 17:48   Re: Biohazard v2.00 Beta 3b (Zombie Mod)
Reply With Quote #4054

Quote:
Originally Posted by alexclaudiu2003 View Post
Hello, this plugin crash my server
PHP Code:
#include <amxmodx>
#include <biohazard>
#include <fakemeta>
#include <fakemeta_util>
#include <hamsandwich>
#define PLUGIN  "[Bio] Zombie: Finger"
#define AUTHOR  "Aragon*"
#define VERSION "1.0"
#define ZOMBIE_NAME "Finger (Run)"     //Zombie Name
#define ZOMBIE_DESC "press G Run" //Zobmie Description
#define ZOMBIE_MODEL "models/player/bio30_finger/bio30_finger.mdl"     //Zombie Model
#define ZOMBIE_CLAWS "models/player/bio30_finger/claws_finger.mdl" //Claws Model
#define ZOMBIE_HEALTH  555.0 //Health value
#define ZOMBIE_SPEED  300.0 //Speed value
#define ZOMBIE_GRAVITY  1.0 //Gravity multiplier
#define ZOMBIE_ATTACK  1.5 //Zombie damage multiplier
#define ZOMBIE_REGENDLY  0.25 //Regeneration delay value
#define ZOMBIE_KNOCKBACK 0.0 //Knockback multiplier
#define TASKID_FASTRUN_HEARTBEAT 12314
#define TASKID_START_POWER  2131
new FastRun_Sound[][] = {
 
"Biohazard30/bio30_finger/pukricide.wav"
}
new const 
Tag[  ] = "[Biohazard]";
new Class, 
FastRun[33], FastRun_Countdown[33]
new 
cvar_fastrun_durationcvar_fastrun_countdowncvar_fastrun_speed;
public 
plugin_init() {         
 
register_plugin(PLUGIN,AUTHOR,VERSION)
 
is_biomod_active() ? plugin_init2() : pause("ad")
}
public 
plugin_init2() {
 Class = 
register_class(ZOMBIE_NAMEZOMBIE_DESC )
 
 
set_class_pmodel(Class, ZOMBIE_MODEL)
 
set_class_wmodel(Class, ZOMBIE_CLAWS)
 
 
set_class_data(Class, DATA_HEALTHZOMBIE_HEALTH);
 
set_class_data(Class, DATA_SPEEDZOMBIE_SPEED);
 
set_class_data(Class, DATA_GRAVITYZOMBIE_GRAVITY);
 
set_class_data(Class, DATA_ATTACKZOMBIE_ATTACK);
 
set_class_data(Class, DATA_REGENDLYZOMBIE_REGENDLY);
 
set_class_data(Class, DATA_KNOCKBACKZOMBIE_KNOCKBACK);
 
 
register_clcmd"drop""CMD_FastRun");
 
 
register_event("DeathMsg""EVENT_Death""a")
 
 
register_forward(FM_PlayerPreThink,"FWD_PlayerPreThink")
 
 
RegisterHam(Ham_Spawn"player""HAM_Spawn_Post"1);
 
 
cvar_fastrun_duration register_cvar("bio_fastrun_duration""13.0")
 
cvar_fastrun_countdown register_cvar("bio_fastrun_countdown""7.0")
 
cvar_fastrun_speed register_cvar("bio_fastrun_speed""500.0")  
}
public 
plugin_precache() {
 
precache_model(ZOMBIE_CLAWS)
 
precache_model(ZOMBIE_MODEL)
 
 for(new 
0sizeof FastRun_Soundi++ )
  
precache_sound(FastRun_Sound[i]);
}
public 
client_disconect(id)
{
         
remove_task(id TASKID_FASTRUN_HEARTBEAT)
    
remove_task(id)
}
public 
EVENT_Death() {
 
FastRun[read_data(2)] = 0
 FastRun_Countdown
[read_data(2)] = 0
 remove_task
(read_data(2) + TASKID_FASTRUN_HEARTBEAT)
}
public 
event_infect(victimattacker) {
 if(
get_user_class(victim) == Class) {
  
FastRun[victim] = 0
  FastRun_Countdown
[victim] = 0
  remove_task
(victim TASKID_FASTRUN_HEARTBEAT)
  
ColorChat(victim"^x04%s^x01 Pentru a folosi^x03 ultra viteza^x01 apasa tasta^x03 G^x01."Tag)
 }
}
public 
FWD_PlayerPreThink(id) {
 if(
is_user_alive(id) && FastRun[id]) {
  if(
fm_get_user_maxspeed(id) < get_pcvar_float(cvar_fastrun_speed) && fm_get_user_maxspeed(id) > 1.0)
   
fm_set_user_maxspeed(idget_pcvar_float(cvar_fastrun_speed))
 }
 if(
get_user_weapon(id) != CSW_KNIFE && task_exists(id TASKID_START_POWER))
  
remove_task(id TASKID_START_POWER)
}
public 
HAM_Spawn_Post(id) { 
 
FastRun[id] = 0
 FastRun_Countdown
[id] = 0
 remove_task
(id TASKID_FASTRUN_HEARTBEAT)
}
public 
CMD_FastRun(id) {
 new 
Float:NextAttack get_pdata_float(id835);
 if(
is_user_alive(id) && get_user_class(id) == Class && is_user_zombie(id) && get_user_weapon(id) == CSW_KNIFE && NextAttack <= 0.0) {
  if(!
FastRun[id] && !FastRun_Countdown[id]) {
   
set_pdata_float(id831.65);
   
set_weapon_anim(id9)
   
set_task(1.50"StartRun"id TASKID_START_POWER);
  }
  return 
PLUGIN_HANDLED
 
}
 return 
PLUGIN_CONTINUE
}
public 
StartRun(id) {
 
id -= TASKID_START_POWER
 
 
if(!is_user_connected(id))
 {
     return;
 }
 
engclient_cmd(id"weapon_knife");
 
set_pdata_float(id831.565);
 
set_weapon_anim(id10)
 
EffectFastrun(id95)
 
emit_sound(idCHAN_VOICEFastRun_Sound[0], 1.0ATTN_NORM0PITCH_NORM)
 
set_task(2.0"FastRunHeartBeat"id TASKID_FASTRUN_HEARTBEAT__"b")
 
FastRun[id] = get_pcvar_num(cvar_fastrun_duration);
 
 if(
FastRun[id]) {
  new 
Message[256];
  
formatex(Message,sizeof(Message)-1,"Fast Run^n(%d second%s remaining).",FastRun[id], FastRun[id] > "s" "");
  
  
HudMessage(idMessage_______0.9);
  
set_task(1.0"TASK_CountDown"id);
 }
}
public 
TASK_CountDown(id) {
 if (!
is_user_alive(id) || !is_user_zombie(id) || get_user_class(id) != Class) {
  
FastRun[id] = 0
 
}
 else if(
is_user_alive(id) && FastRun[id] > 1) {
  
FastRun[id] --;
  new 
Message[256];
  
formatex(Message,sizeof(Message)-1,"Fast Run^n(%d second%s remaining).",FastRun[id], FastRun[id] > "s" "");
  
  
HudMessage(idMessage_______0.9);
  
set_task(1.0"TASK_CountDown"id);
 }
 else if(
FastRun[id] <= 1) {
  
FastRun[id] = 0
  remove_task
(id TASKID_FASTRUN_HEARTBEAT)
  
fm_set_user_maxspeed(idZOMBIE_SPEED)
  
EffectFastrun(id)
  
  
FastRun_Countdown[id] = get_pcvar_num(cvar_fastrun_countdown)
  
  if(
FastRun_Countdown[id]) {
   new 
Message[256];
   
formatex(Message,sizeof(Message)-1,"Fast Run not ready.^n(%d second%s remaining).",FastRun_Countdown[id], FastRun_Countdown[id] > "s" "");
   
   
HudMessage(idMessage_______0.9);
   
set_task(1.0"TASK_CountDown2"id);
  }
 }
}
public 
TASK_CountDown2(id) {
 if (!
is_user_alive(id) || !is_user_zombie(id) || get_user_class(id) != Class)
  
FastRun_Countdown[id] = 0
 
else if(is_user_alive(id) && FastRun_Countdown[id] > 1) {
  
FastRun_Countdown[id] --;
  new 
Message[256];
  
formatex(Message,sizeof(Message)-1,"Fast Run not ready.^n(%d second%s remaining).",FastRun_Countdown[id], FastRun_Countdown[id] > "s" "");
  
  
HudMessage(idMessage_______0.9);
  
set_task(1.0"TASK_CountDown2"id);
 }
 else if(
FastRun_Countdown[id] <= 1) {
  new 
Message[256];
  
formatex(Message,sizeof(Message)-1,"Fast Run is ready.");
  
  
HudMessage(idMessage_______0.9);
  
FastRun_Countdown[id] = 0;
 }
}
public 
FastRunHeartBeat(id
{
 if(
is_user_connected(id)) 
          return

 
id -= TASKID_FASTRUN_HEARTBEAT
 
 
if (FastRun[id]) 
 {
   
emit_sound(idCHAN_VOICEFastRun_Sound[random_num(1sizeof FastRun_Sound 1)], 1.0ATTN_NORM0PITCH_NORM)
  
   new 
Color[3]
   
Color[0] = 200
   Color
[1] = 0
   Color
[2] = 0
   
   UTIL_ScreenFade
(idColor0.50.5125)
   
 }
}
EffectFastrun(idnum 90) {
 if(
is_user_connected(id)) {
  
message_begin(MSG_ONEget_user_msgid("SetFOV"), {0,0,0}, id)
  
write_byte(num)
  
message_end()
 }
}
stock FixedUnsigned16(Float:flValueiScale) {
 new 
iOutput;
 
 
iOutput floatround(flValue iScale);
 if ( 
iOutput )
  
iOutput 0;
 
 if ( 
iOutput 0xFFFF )
  
iOutput 0xFFFF;
 return 
iOutput;
}
stock UTIL_ScreenFade(id=0,iColor[3]={0,0,0},Float:flFxTime=-1.0,Float:flHoldTime=0.0,iAlpha=0,iFlags=0x0000,bool:bReliable=false,bool:bExternal=false) {
 if( 
id && !is_user_connected(id))
  return;
 
 new 
iFadeTime;
 if( 
flFxTime == -1.0 ) {
  
iFadeTime 4;
 }
 else {
  
iFadeTime FixedUnsigned16flFxTime 1<<12 );
 }
 
 static 
gmsgScreenFade;
 if( !
gmsgScreenFade ) {
  
gmsgScreenFade get_user_msgid("ScreenFade");
 }
 
 new 
MSG_DEST;
 if( 
bReliable ) {
  
MSG_DEST id MSG_ONE MSG_ALL;
 }
 else {
  
MSG_DEST id MSG_ONE_UNRELIABLE MSG_BROADCAST;
 }
 
 if( 
bExternal ) {
  
emessage_beginMSG_DESTgmsgScreenFade_id );
  
ewrite_shortiFadeTime );
  
ewrite_shortFixedUnsigned16flHoldTime 1<<12 ) );
  
ewrite_shortiFlags );
  
ewrite_byteiColor[0] );
  
ewrite_byteiColor[1] );
  
ewrite_byteiColor[2] );
  
ewrite_byteiAlpha );
  
emessage_end();
 }
 else {
  
message_beginMSG_DESTgmsgScreenFade_id );
  
write_shortiFadeTime );
  
write_shortFixedUnsigned16flHoldTime 1<<12 ) );
  
write_shortiFlags );
  
write_byteiColor[0] );
  
write_byteiColor[1] );
  
write_byteiColor[2] );
  
write_byteiAlpha );
  
message_end();
 }
}
stock UTIL_FadeToBlack(id,Float:fxtime=3.0,bool:bReliable=false,bool:bExternal=false) {
 
UTIL_ScreenFade(id_fxtimefxtime2550x0001|0x0004,bReliable,bExternal);
}
stock set_weapon_anim(idanim) {
 
set_pev(idpev_weaponanimanim);
 if(
is_user_connected(id)) {
  
message_begin(MSG_ONESVC_WEAPONANIM_id);
  
write_byte(anim);
  
write_byte(pev(idpev_body));
  
message_end();
 }
}
#define clamp_byte(%1)       ( clamp( %1, 0, 255 ) )
#define pack_color(%1,%2,%3) ( %3 + ( %2 << 8 ) + ( %1 << 16 ) )
stock HudMessage(const id, const message[], red 0green 160blue 0Float:= -1.0Float:0.65effects 2Float:fxtime 0.01Float:holdtime 3.0Float:fadeintime 0.01Float:fadeouttime 0.01) {
 new 
count 1players[32];
 
 if(
idplayers[0] = id;
 else 
get_players(playerscount"ch"); {
  for(new 
0counti++) {
   if(
is_user_connected(players[i])) { 
    new 
color pack_color(clamp_byte(red), clamp_byte(green), clamp_byte(blue))
    
    
message_begin(MSG_ONE_UNRELIABLESVC_DIRECTOR_players[i]);
    
write_byte(strlen(message) + 31);
    
write_byte(DRC_CMD_MESSAGE);
    
write_byte(effects);
    
write_long(color);
    
write_long(_:x);
    
write_long(_:y);
    
write_long(_:fadeintime);
    
write_long(_:fadeouttime);
    
write_long(_:holdtime);
    
write_long(_:fxtime);
    
write_string(message);
    
message_end();
   }
  }
 }
}
stock ColorChat(const id, const input[], any:...) {
 new 
count 1players[32];
 static 
msg[191];
 
vformat(msg190input3);
 
 
replace_all(msg190"!g""^4");
 
replace_all(msg190"!y""^1");
 
replace_all(msg190"!t""^3");
 
 if(
idplayers[0] = id;
 else 
get_players(playerscount"ch"); {
  for(new 
0counti++) {
   if(
is_user_connected(players[i])) {
    
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players[i]);
    
write_byte(players[i]);
    
write_string(msg);
    
message_end();
   }
  }
 } 
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1049\\ f0\\ fs16 \n\\ par }
*/ 
Anyway,server crash is not caused by this plugin.That error is harmless. Biohazard mod is not stable,and crash often happens.
Krtola is offline
Send a message via Skype™ to Krtola
McMasterSorcerer
Junior Member
Join Date: Dec 2015
Old 12-17-2015 , 17:58   Re: Biohazard v2.00 Beta 3b (Zombie Mod)
Reply With Quote #4055

How do i install plugins????
McMasterSorcerer is offline
Maj. Stoyan
Member
Join Date: Jul 2014
Old 02-03-2016 , 20:38   Re: Biohazard v2.00 Beta 3b (Zombie Mod)
Reply With Quote #4056

Hello i want a Ambiance sound, but dont have in this mode, i mean a women scream and other in round sounds .. how can i add? Look this server and listen the sound on round, women scream , ghose sound and other - 79.124.59.244:27020 pls this is not reclame, i very need this sounds .. pls pls
__________________
Maj. Stoyan is offline
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 02-08-2016 , 15:29   Re: Biohazard v2.00 Beta 3b (Zombie Mod)
Reply With Quote #4057

I present to you a fun and unique effect for round end.
Works great for biohazard mod.
I do not have a picture, but you can view the video on youtube-pay attention to 2:45
https://www.youtube.com/watch?v=LUm1Ty47BwI

PHP Code:
#include <amxmodx> 
#include <cstrike>
#include <fakemeta> 
#include <engine>
#include <biohazard> 

new ct_win_sprite
new ts_win_sprite

public plugin_precache()
{
    
ct_win_sprite precache_model("sprites/survivors_effect.spr")
        
ts_win_sprite precache_model("sprites/zombies_effects.spr")
}

public 
t_win()
{
    static 
id;
    for(
id id <= get_maxplayers() ; id++)
    {
        if(!
is_user_connected(id))
            continue;

        
ts_win_Effects(id)
    }
}

public 
ct_win()
{
    static 
id;
    for(
id id <= get_maxplayers() ; id++)
    {
        if(!
is_user_connected(id))
            continue;

        
ct_win_Effects(id)
    }
}

public 
plugin_init()
{        
    
register_plugin("Round End Effect""1.1""Krtola")
        
        
register_event("SendAudio""t_win""a""2&%!MRAD_terwin")
        
register_event("SendAudio""ct_win""a""2&%!MRAD_ctwin")    
}

public 
ct_win_Effects(id)
{    
    new 
FloatHumanOrigin]
    
entity_get_vectoridEV_VEC_originHumanOrigin )
    
engfuncEngFunc_MessageBeginMSG_ONE_UNRELIABLESVC_TEMPENTITYHumanOriginid)
    
write_byteTE_SPRITETRAIL )    
    
engfuncEngFunc_WriteCoordHumanOrigin] )
    
engfuncEngFunc_WriteCoordHumanOrigin] )
    
engfuncEngFunc_WriteCoordHumanOrigin] + 200)
    
engfuncEngFunc_WriteCoordHumanOrigin] )
    
engfuncEngFunc_WriteCoordHumanOrigin] )
    
engfuncEngFunc_WriteCoordHumanOrigin] + 200 )
    
write_shortct_win_sprite 
    
write_byte
    
write_byte30 )
    
write_byte
    
write_byte75 )
    
write_byte70 )
    
message_end( )
}

public 
ts_win_Effects(id)
{    
    new 
FloatHumanOrigin]
    
entity_get_vectoridEV_VEC_originHumanOrigin )
    
engfuncEngFunc_MessageBeginMSG_ONE_UNRELIABLESVC_TEMPENTITYHumanOriginid)
    
write_byteTE_SPRITETRAIL )    
    
engfuncEngFunc_WriteCoordHumanOrigin] )
    
engfuncEngFunc_WriteCoordHumanOrigin] )
    
engfuncEngFunc_WriteCoordHumanOrigin] + 200)
    
engfuncEngFunc_WriteCoordHumanOrigin] )
    
engfuncEngFunc_WriteCoordHumanOrigin] )
    
engfuncEngFunc_WriteCoordHumanOrigin] + 200 )
    
write_shortts_win_sprite 
    
write_byte
    
write_byte30 )
    
write_byte
    
write_byte75 )
    
write_byte70 )
    
message_end( )

/////////////////////////////////////////////////////////////////////////////////////////////////////////////

And this is Explosive Flare for Biohazard Mod.
For all the resources, see here:https://forums.alliedmods.net/showthread.php?t=270471

PHP Code:
#include <amxmodx> 
#include <fakemeta> 
#include <fakemeta> 
#include <hamsandwich> 
#include <fun> 
#include <xs> 
#include <biohazard> 

#define pev_flare pev_iuser4 

#define flare_id 1337 

#define is_ent_flare(%1) (pev(%1, pev_flare) == flare_id) ? 1 : 0 

new const explosive_flare_model[] = "models/w_smokegrenade.mdl" 

const Float:FLARE_EXPLOSION_DAMAGE 15.0 
const Float:FLARE_EXPLOSION_RADIUS 270.0 
const Float:FLARE_DAMAGE_MULTI 1.0 
const DMG_HEGRENADE = (1<<24

new 
explosive_sprite2explosive_sprite 

public plugin_precache()  

    
precache_model(explosive_flare_model
        
explosive_sprite precache_model("sprites/flare_exp_1.spr"
        
explosive_sprite2 precache_model("sprites/flare_exp_2.spr"


public 
plugin_init() 

    
register_plugin("[BH]Explosive Flare""1.0""[Half-Life] Biohazard"

    
register_forward(FM_SetModel"explosive_model_stuff"
     
    
register_forward(FM_Think"explosive_think"


public 
explosive_model_stuff(ent, const model[])  

    if(!
pev_valid(ent) || !equal(model[9], "smokegrenade.mdl")) 
        return 
FMRES_IGNORED 

    
static Float:light_origin[3]   

    
pev(ent,pev_origin,light_origin

    static 
classname[32]; pev(entpev_classnameclassname31

    if(
equal(classname"grenade")) 
    { 
        
engfunc(EngFunc_SetModelentexplosive_flare_model

        
set_task(0.1"make_flare_flash"ent

                
set_task(4.0"make_flare_explode"ent

        
set_pev(entpev_flare,   flare_id

        
set_pev(entpev_nextthinkget_gametime() + 199
         
        return 
FMRES_SUPERCEDE 
    

    return 
FMRES_IGNORED 


public 
make_flare_flash(ent)  

    if(!
pev_valid(ent)) 
        return 
FMRES_IGNORED 

    
static Float:light_origin[3]  
  
    
pev(ent,pev_origin,light_origin

    static 
classname[32]; pev(entpev_classnameclassname31

    if(
equal(classname"grenade")) 
        { 
        
engfunc(EngFunc_SetModelentexplosive_flare_model
        
message_begin(MSG_BROADCAST,SVC_TEMPENTITY
        
write_byte(27)  
        
engfunc(EngFunc_WriteCoord,light_origin[0])  
        
engfunc(EngFunc_WriteCoord,light_origin[1])  
        
engfunc(EngFunc_WriteCoord,light_origin[2])  
        
write_byte(22)    // radius 
        
write_byte(237// r 
            
write_byte(247// g 
            
write_byte(35// b 
        
write_byte(3)     // life 
        
write_byte(0)    // rate 
        
message_end() 
        
set_task(0.1,"make_flare_flash",ent); 
         
        return 
FMRES_SUPERCEDE 
        

    return 
FMRES_IGNORED 


public 
make_flare_explode(ent

    if(!
pev_valid(ent)) 
            return 

     new 
Float:atkOrigin[3

     
pev(entpev_originatkOrigin

     static 
classname[32]; pev(entpev_classnameclassname31

     if(
equal(classname"grenade")) 
     {      
    
engfunc(EngFunc_MessageBeginMSG_PASSVC_TEMPENTITYatkOrigin0
    
write_byte(TE_EXPLOSION
    
engfunc(EngFunc_WriteCoordatkOrigin[0]) 
    
engfunc(EngFunc_WriteCoordatkOrigin[1]) 
    
engfunc(EngFunc_WriteCoordatkOrigin[2] + 50.0
    
write_short(explosive_sprite
    
write_byte(15
    
write_byte(15
        
write_byte(10
    
message_end() 

        
message_begin (MSG_BROADCAST,SVC_TEMPENTITY
        
write_byteTE_SPRITETRAIL )  
        
engfunc(EngFunc_WriteCoordatkOrigin])  
        
engfunc(EngFunc_WriteCoordatkOrigin]) 
        
engfunc(EngFunc_WriteCoordatkOrigin] + 200.0
        
engfunc(EngFunc_WriteCoordatkOrigin])  
        
engfunc(EngFunc_WriteCoordatkOrigin]) 
        
engfunc(EngFunc_WriteCoordatkOrigin] + 30.0
        
write_short(explosive_sprite2)  
        
write_byte(20)  
        
write_byte(random_num(1,2))  
        
write_byte(2)  
        
write_byte(15)  
        
write_byte(2)  
        
message_end()  

        
set_task(4.0"make_flare_explode"ent
     } 
                                
     new 
attacker pev(entpev_owner

     if(!
is_user_connected(attacker)) 
     { 
        
engfunc(EngFunc_RemoveEntityent
        return 
     } 
     
     new 
victim = -
     
     
while((victim engfunc(EngFunc_FindEntityInSpherevictimatkOriginFLARE_EXPLOSION_RADIUS)) != 0
     {      
        if(!
is_user_alive(victim) || !is_user_zombie(victim)) continue; 
         
        new 
Float:fOrigin[3], Float:fDistanceFloat:fDamage 

        pev
(victimpev_originfOrigin

        
fDistance get_distance_f(fOriginatkOrigin

        
fDamage FLARE_EXPLOSION_DAMAGE floatmul(FLARE_EXPLOSION_DAMAGEfloatdiv(fDistanceFLARE_EXPLOSION_RADIUS)) 

        
fDamage *= 1.0 

        
if(fDamage 1.0) continue; 
         
        
xs_vec_sub(fOriginatkOriginfOrigin

        
xs_vec_mul_scalar(fOriginfDamage*FLARE_DAMAGE_MULTIfOrigin

        
xs_vec_mul_scalar(fOriginFLARE_EXPLOSION_DAMAGE xs_vec_len(fOrigin), fOrigin

        
set_pev(victimpev_velocityfOrigin
         
        
ExecuteHamB(Ham_TakeDamagevictimentattackerfDamageDMG_HEGRENADE
     } 


public 
explosive_think(ent)  

      if(
pev_valid(ent) && is_ent_flare(ent)) 
      { 
      
engfunc(EngFunc_RemoveEntityent
      } 

Attached Files
File Type: zip Sprites For RoundEnd Effect.zip (57.6 KB, 268 views)

Last edited by Krtola; 02-09-2016 at 03:39.
Krtola is offline
Send a message via Skype™ to Krtola
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 03-17-2016 , 04:31   Re: Biohazard v2.00 Beta 3b (Zombie Mod)
Reply With Quote #4058

Effect for players who is infected by other zombies or when game started.
Just take a look this video:
https://www.youtube.com/watch?v=JeIe...ature=youtu.be

PHP Code:
#include <amxmodx> 
#include <fakemeta>
#include <biohazard> 

new sprites_number1sprites_number2

new const z_sprites1[] = "sprites/biohazard/poison_spr.spr" 

new const z_sprites2[] = "sprites/biohazard/poison_flare.spr"

public plugin_init()
{
    
register_plugin("Infect Effect Sprites""1.0""Krtola")
}

public 
plugin_precache() 
{     
    
sprites_number1 precache_model(z_sprites1)  
    
sprites_number2 engfunc(EngFunc_PrecacheModelz_sprites2)
}

public 
event_infect(id)
{
    new 
Float:vOrigin[3
    
pev(idpev_originvOrigin)

    if(
is_user_zombie(id))
    {      
        
sprite_play_animation(vOrigin40.0)
        
sprites_play_animation2(id)
    }
}

sprite_play_animation(const Float:vOrigin[3], Float:Add

    
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYvOrigin0
    
write_byte(TE_SPRITE
    
engfunc(EngFunc_WriteCoordvOrigin[0]) 
    
engfunc(EngFunc_WriteCoordvOrigin[1]) 
    
engfunc(EngFunc_WriteCoordvOrigin[2] + Add
    
write_short(sprites_number1
    
write_byte(8
    
write_byte(200
    
message_end() 
}


sprites_play_animation2(id

        new 
Float:vOrigin[3]

        
set_pev(idpev_iuser20
        
pev(idpev_originvOrigin)  

        
message_begin (MSG_BROADCAST,SVC_TEMPENTITY
        
write_byteTE_SPRITETRAIL // Throws a shower of sprites or models 
        
write_coordfloatround(vOrigin]) ) // start pos 
        
write_coordfloatround(vOrigin]) ) 
        
write_coordfloatround(vOrigin]) ) 
        
write_coordfloatround(vOrigin]) ) // velocity 
        
write_coordfloatround(vOrigin]) ) 
        
write_coordfloatround(vOrigin]) +20
        
write_short(sprites_number2// spr 
        
write_byte(15// (count) 
        
write_byte(random_num(2,3)) // (life in 0.1's) 
        
write_byte(2// byte (scale in 0.1's) 
        
write_byte(random_num(20,30)) // (velocity along vector in 10's) 
        
write_byte(15// (randomness of velocity in 10's) 
        
message_end()

Version for Zombie Plague mod is herehttps://forums.alliedmods.net/showpo...15&postcount=1
Attached Files
File Type: zip Event Infect Effect.zip (144.4 KB, 297 views)

Last edited by Krtola; 03-17-2016 at 04:38.
Krtola is offline
Send a message via Skype™ to Krtola
gyda
Member
Join Date: Jul 2016
Location: Iran
Old 08-22-2016 , 09:15   Re: Biohazard v2.00 Beta 3b (Zombie Mod)
Reply With Quote #4059

how to add new special zombie class that Only Admins with flag "a" can choose this Class


- health 300
- Gravity+++
- Speed+++
- Knockback+++
- Predator Model
__________________
«There exists a field, beyond all notions of right and wrong. I will meet you there»
gyda is offline
segos
Junior Member
Join Date: May 2009
Location: UK
Old 12-04-2016 , 16:13   Re: Biohazard v2.00 Beta 3b (Zombie Mod)
Reply With Quote #4060

Hello guys. How i can fix bugs with zombie models when are freezed or invisible. Some ss:
http://segos.es/10_screenshots_20161204195148_1.jpg
http://segos.es/10_screenshots_20161204195207_1.jpg
http://segos.es/20161204203008_1.jpg

When we are humans its ok, but when we are zombies no, we can see it on the 2nd screenshot. Just look near zombie head, we can see invisibility ct model

Last edited by segos; 12-04-2016 at 16:17.
segos is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:39.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode