Raised This Month: $ Target: $400
 0% 

[zp] nst tank -> zp


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
saharmie
Junior Member
Join Date: Sep 2010
Location: Brunei
Old 08-08-2011 , 06:14   [zp] nst tank -> zp
Reply With Quote #1

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <hamsandwich>
#include <zombieplague>
#include <fun>
#define PLUGIN "NST Zombie Class Tank"
#define VERSION "1.0"
#define AUTHOR "NST"
new spr_skill[] = "g_fastrun"
new g_zclass_sprint
new const zclass_name[] = "Tank" // name
new const zclass_info[] = "Normal Zombie" // description
new const zclass_model[] = "tank_zombi_host" // model
new const zclass_clawmodel[] = "v_knife_tank_zombi.mdl" // claw model
const zclass_health 2000 
const zclass_speed 240
const Float:zclass_gravity 0.9 
const Float:zclass_knockback 2.0
new Float:fastrun_time 8.0
new Float:fastrun_timewait 20.0
new Float:fastrun_speed 350.0
new const sound_fastrun_start[] = "zombi/zombi_pressure.wav"
new const sound_fastrun_heartbeat[2][] = { "zombi/zombi_pre_idle_1.wav" "zombi/zombi_pre_idle_2.wav" }
new Array:
fastrun_glowshell_color "255,003,000"
new Array:fastrun_fov 105
new g_fastrun[33], g_fastrun_wait[33], g_check[33], g_msgStatusIcong_current_speed[33]
// Task offsets
enum (+= 100)
{
 
TASK_FASTRUN 2000,
 
TASK_FASTRUN_HEARTBEAT,
 
TASK_FASTRUN_WAIT,
 
TASK_BOT_USE_SKILL
}
// IDs inside tasks
#define ID_FASTRUN (taskid - TASK_FASTRUN)
#define ID_FASTRUN_HEARTBEAT (taskid - TASK_FASTRUN_HEARTBEAT)
#define ID_FASTRUN_WAIT (taskid - TASK_FASTRUN_WAIT)
#define ID_BOT_USE_SKILL (taskid - TASK_BOT_USE_SKILL)
 
public plugin_init()
{
 
register_plugin(PLUGINVERSIONAUTHOR)
 
 
// Language files
 
register_dictionary("zombie_plague.txt")
 
 
// msg
 
g_msgStatusIcon get_user_msgid("StatusIcon")
 
 
// Events
 
register_logevent("logevent_round_start",2"1=Round_Start")
 
register_event("HLTV""event_round_start""a""1=0""2=0")
 
register_event("DeathMsg""Death""a")
 
register_forward(FM_CmdStart"fw_CmdStart")
 
register_forward(FM_PlayerPreThink"fw_PlayerPreThink")
 
register_forward(FM_EmitSound"EmitSound"
 
 
// clien cmd
 //register_concmd("ww", "ww")
 
register_clcmd("drop""cmd_fastrun")
}
public 
plugin_precache()

 
precache_sound(sound_fastrun_start)
 
 
engfunc(EngFunc_PrecacheSoundsound_fastrun_start)
 
 
// register zombie class
 
g_zclass_sprint zp_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockback)
}
public 
event_round_start()
{
 for (new 
id=1id<33id++)
 {
  if (!
is_user_connected(id)) continue;
 
  
reset_value_player(id)
  
StatusIcon(idspr_skill0)
 }
}
public 
logevent_round_start()
{
 for (new 
id=1id<33id++)
 {
  if (!
is_user_connected(id)) continue;
  if (
is_user_bot(id))
  {
   if (
task_exists(id+TASK_BOT_USE_SKILL)) remove_task(id+TASK_BOT_USE_SKILL)
   
set_task(float(random_num(5,15)), "bot_use_skill"id+TASK_BOT_USE_SKILL)
  }
 }
}
public 
Death()
{
 new 
victim read_data(2
 
 
StatusIcon(victimspr_skill0)
 
reset_value_player(victim)
}
reset_value_player(id)
{
 if (
task_exists(id+TASK_FASTRUN)) remove_task(id+TASK_FASTRUN)
 if (
task_exists(id+TASK_FASTRUN_HEARTBEAT)) remove_task(id+TASK_FASTRUN_HEARTBEAT)
 if (
task_exists(id+TASK_FASTRUN_WAIT)) remove_task(id+TASK_FASTRUN_WAIT)
 if (
task_exists(id+TASK_BOT_USE_SKILL)) remove_task(id+TASK_BOT_USE_SKILL)
 
 
g_fastrun[id] = 0
 g_fastrun_wait
[id] = 0
 g_check
[id] = 0
}
// bot use skill
public bot_use_skill(taskid)
{
 new 
id ID_BOT_USE_SKILL
 
if (!is_user_bot(id)) return;
 
cmd_fastrun(id)
 if (
task_exists(taskid)) remove_task(taskid)
 
set_task(float(random_num(5,15)), "bot_use_skill"id+TASK_BOT_USE_SKILL)
}
// #################### FASTRUN PUBLIC ####################
// Cmd fast run
public cmd_fastrun(id)
{
 if (
g_zclass_sprint==zp_get_user_zombie_class(id) && zp_get_user_zombie(id) && !g_fastrun[id] && !g_fastrun_wait[id])
 {
  
// set current speed
  
pev(idpev_maxspeedg_current_speed[id])
 
  
// set fastrun
  
g_fastrun[id] = 1
 
  
// set glow shell
  
new color[3]
  
color[0] = ArrayGetCell(fastrun_glowshell_color0)
  
color[1] = ArrayGetCell(fastrun_glowshell_color1)
  
color[2] = ArrayGetCell(fastrun_glowshell_color2)
  
fm_set_rendering(idkRenderFxGlowShellcolor[0], color[1], color[2], kRenderNormal0)
  
// set effect
  
EffectFastrun(idfastrun_fov)
 
  
// task fastrun
  
new Float:timerun
  timerun 
fastrun_time
  
if (task_exists(id+TASK_FASTRUN)) remove_task(id+TASK_FASTRUN)
  
set_task(timerun"RemoveFastRun"id+TASK_FASTRUN)
 
  
// play sound start
  
engfunc(EngFunc_EmitSoundidCHAN_AUTOsound_fastrun_start1.0ATTN_NORM0PITCH_NORM)
 
  
// task fastrun sound heartbeat
  
if (task_exists(id+TASK_FASTRUN_HEARTBEAT)) remove_task(id+TASK_FASTRUN_HEARTBEAT)
  
set_task(2.0"FastRunHeartBeat"id+TASK_FASTRUN_HEARTBEAT__"b")
  return 
PLUGIN_HANDLED
 
}
 
 return 
PLUGIN_CONTINUE
}
public 
RemoveFastRun(taskid)
{
 new 
id ID_FASTRUN
 g_fastrun
[id] = 0
 set_pev
(idpev_maxspeedg_current_speed[id])
 
fm_set_rendering(id)
 
EffectFastrun(id)
 if (
task_exists(taskid)) remove_task(taskid)
 
 new 
Float:timewait fastrun_timewait
 timewait 
0.5
 g_fastrun_wait
[id] = 1
 
if (task_exists(id+TASK_FASTRUN_WAIT)) remove_task(id+TASK_FASTRUN_WAIT)
 
set_task(timewait"RemoveWaitFastRun"id+TASK_FASTRUN_WAIT)
}
public 
RemoveWaitFastRun(taskid)
{
 new 
id ID_FASTRUN_WAIT
 g_fastrun_wait
[id] = 0
 
if (task_exists(taskid)) remove_task(taskid)
}
public 
FastRunHeartBeat(taskid)
{
 new 
id ID_FASTRUN_HEARTBEAT
 
 
if (g_fastrun[id])
 
engfunc(EngFunc_EmitSoundidCHAN_AUTOsound_fastrun_heartbeat1.0ATTN_NORM0PITCH_NORM)
 else if (
task_exists(taskid)) remove_task(taskid)
}
// show hide spr
public fw_CmdStart(iduc_handleseed)
{
 if (!
is_user_alive(id)) return;
 
 if (
g_zclass_sprint==zp_get_user_zombie_class(id) && zp_get_user_zombie(id))
 {
  
// show status icon help
  
if ( (g_fastrun[id] || g_fastrun_wait[id]) && g_check[id] != 2)
  {
   
g_check[id] = 2
   StatusIcon
(idspr_skill2)
  }
  else if (
g_check[id] != 1)
  {
   
g_check[id] = 1
   StatusIcon
(idspr_skill1)
  }
 }
 else if (
g_check[id])
 {
  
// hide status icon
  
g_check[id] = 0
  StatusIcon
(idspr_skill0)
 }
 
 
 return;
}
// set speed
public fw_PlayerPreThink(id)
{
 if (!
is_user_alive(id)) return;
 
 if (
g_zclass_sprint==zp_get_user_zombie_class(id) && zp_get_user_zombie(id) && g_fastrun[id])
 {
  
set_pev(idpev_maxspeedfastrun_speed)
 }
}
// MAIN FUNCTION
StatusIcon(idsprname[], run)

 if (!
is_user_connected(id)) return;
 
 
message_begin(MSG_ONEg_msgStatusIcon, {0,0,0}, id);
 
write_byte(run); // status (0=hide, 1=show, 2=flash)
 
write_string(sprname); // sprite name
 
message_end();
}
fm_set_rendering(entityfx kRenderFxNone255255255render kRenderNormalamount 16
{
 new 
Float:RenderColor[3];
 
RenderColor[0] = float(r);
 
RenderColor[1] = float(g);
 
RenderColor[2] = float(b);
 
set_pev(entitypev_renderfxfx);
 
set_pev(entitypev_rendercolorRenderColor);
 
set_pev(entitypev_rendermoderender);
 
set_pev(entitypev_renderamtfloat(amount));
 return 
1;
}
EffectFastrun(idnum 90)
{
 
message_begin(MSG_ONEget_user_msgid("SetFOV"), {0,0,0}, id)
 
write_byte(num)
 
message_end()
}
// OTHER PUNLIC
public ww(id)
{
 for (new 
id 1id <= 32id++)
 {
  
cmd_fastrun(id)
 }
 
client_print(idprint_chat"[%s][%s][%i][%i][%i]"zclass_modelzclass_gravityzclass_speedzclass_knockback)
 
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/ 
(2 error 006 : must be assigned to an arraynew Array:fastrun_fov = 105

(152) : warning 213: tag mismatch
EffectFastrun(id, fastrun_fov)
__________________

saharmie is offline
Send a message via MSN to saharmie
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 08-08-2011 , 07:04   Re: [zp] nst tank -> zp
Reply With Quote #2

Try it.
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <hamsandwich>
#include <zombieplague>
#include <fun>
#define PLUGIN "NST Zombie Class Tank"
#define VERSION "1.0"
#define AUTHOR "NST"
new spr_skill[] = "g_fastrun"
new g_zclass_sprint
new const zclass_name[] = "Tank" // name
new const zclass_info[] = "Normal Zombie" // description
new const zclass_model[] = "tank_zombi_host" // model
new const zclass_clawmodel[] = "v_knife_tank_zombi.mdl" // claw model
const zclass_health 2000 
const zclass_speed 240
const Float:zclass_gravity 0.9 
const Float:zclass_knockback 2.0
new Float:fastrun_time 8.0
new Float:fastrun_timewait 20.0
new Float:fastrun_speed 350.0
new const sound_fastrun_start[] = "zombi/zombi_pressure.wav"
new const sound_fastrun_heartbeat[2][] = { "zombi/zombi_pre_idle_1.wav" "zombi/zombi_pre_idle_2.wav" }
//new Array:fastrun_glowshell_color = "255,003,000"
const fastrun_glowshell_color_r 255
const fastrun_glowshell_color_g 3
const fastrun_glowshell_color_b 0
//new Array:fastrun_fov = 105
const fastrun_fov 105
new g_fastrun[33], g_fastrun_wait[33], g_check[33], g_msgStatusIcong_current_speed[33]
// Task offsets
enum (+= 100)
{
 
TASK_FASTRUN 2000,
 
TASK_FASTRUN_HEARTBEAT,
 
TASK_FASTRUN_WAIT,
 
TASK_BOT_USE_SKILL
}
// IDs inside tasks
#define ID_FASTRUN (taskid - TASK_FASTRUN)
#define ID_FASTRUN_HEARTBEAT (taskid - TASK_FASTRUN_HEARTBEAT)
#define ID_FASTRUN_WAIT (taskid - TASK_FASTRUN_WAIT)
#define ID_BOT_USE_SKILL (taskid - TASK_BOT_USE_SKILL)
 
public plugin_init()
{
 
register_plugin(PLUGINVERSIONAUTHOR)
 
 
// Language files
 
register_dictionary("zombie_plague.txt")
 
 
// msg
 
g_msgStatusIcon get_user_msgid("StatusIcon")
 
 
// Events
 
register_logevent("logevent_round_start",2"1=Round_Start")
 
register_event("HLTV""event_round_start""a""1=0""2=0")
 
register_event("DeathMsg""Death""a")
 
register_forward(FM_CmdStart"fw_CmdStart")
 
register_forward(FM_PlayerPreThink"fw_PlayerPreThink")
 
register_forward(FM_EmitSound"EmitSound"
 
 
// clien cmd
 //register_concmd("ww", "ww")
 
register_clcmd("drop""cmd_fastrun")
}
public 
plugin_precache()

 
precache_sound(sound_fastrun_start)
 
 
engfunc(EngFunc_PrecacheSoundsound_fastrun_start)
 
 
// register zombie class
 
g_zclass_sprint zp_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockback)
}
public 
event_round_start()
{
 for (new 
id=1id<33id++)
 {
  if (!
is_user_connected(id)) continue;
 
  
reset_value_player(id)
  
StatusIcon(idspr_skill0)
 }
}
public 
logevent_round_start()
{
 for (new 
id=1id<33id++)
 {
  if (!
is_user_connected(id)) continue;
  if (
is_user_bot(id))
  {
   if (
task_exists(id+TASK_BOT_USE_SKILL)) remove_task(id+TASK_BOT_USE_SKILL)
   
set_task(float(random_num(5,15)), "bot_use_skill"id+TASK_BOT_USE_SKILL)
  }
 }
}
public 
Death()
{
 new 
victim read_data(2
 
 
StatusIcon(victimspr_skill0)
 
reset_value_player(victim)
}
reset_value_player(id)
{
 if (
task_exists(id+TASK_FASTRUN)) remove_task(id+TASK_FASTRUN)
 if (
task_exists(id+TASK_FASTRUN_HEARTBEAT)) remove_task(id+TASK_FASTRUN_HEARTBEAT)
 if (
task_exists(id+TASK_FASTRUN_WAIT)) remove_task(id+TASK_FASTRUN_WAIT)
 if (
task_exists(id+TASK_BOT_USE_SKILL)) remove_task(id+TASK_BOT_USE_SKILL)
 
 
g_fastrun[id] = 0
 g_fastrun_wait
[id] = 0
 g_check
[id] = 0
}
// bot use skill
public bot_use_skill(taskid)
{
 new 
id ID_BOT_USE_SKILL
 
if (!is_user_bot(id)) return;
 
cmd_fastrun(id)
 if (
task_exists(taskid)) remove_task(taskid)
 
set_task(float(random_num(5,15)), "bot_use_skill"id+TASK_BOT_USE_SKILL)
}
// #################### FASTRUN PUBLIC ####################
// Cmd fast run
public cmd_fastrun(id)
{
 if (
g_zclass_sprint==zp_get_user_zombie_class(id) && zp_get_user_zombie(id) && !g_fastrun[id] && !g_fastrun_wait[id])
 {
  
// set current speed
  
pev(idpev_maxspeedg_current_speed[id])
 
  
// set fastrun
  
g_fastrun[id] = 1
 
  
// set glow shell
  /*new color[3]
  color[0] = ArrayGetCell(fastrun_glowshell_color, 0)
  color[1] = ArrayGetCell(fastrun_glowshell_color, 1)
  color[2] = ArrayGetCell(fastrun_glowshell_color, 2)*/
  
fm_set_rendering(idkRenderFxGlowShellfastrun_glowshell_color_rfastrun_glowshell_color_gfastrun_glowshell_color_bkRenderNormal0)
  
// set effect
  
EffectFastrun(idfastrun_fov)
 
  
// task fastrun
  
new Float:timerun
  timerun 
fastrun_time
  
if (task_exists(id+TASK_FASTRUN)) remove_task(id+TASK_FASTRUN)
  
set_task(timerun"RemoveFastRun"id+TASK_FASTRUN)
 
  
// play sound start
  
engfunc(EngFunc_EmitSoundidCHAN_AUTOsound_fastrun_start1.0ATTN_NORM0PITCH_NORM)
 
  
// task fastrun sound heartbeat
  
if (task_exists(id+TASK_FASTRUN_HEARTBEAT)) remove_task(id+TASK_FASTRUN_HEARTBEAT)
  
set_task(2.0"FastRunHeartBeat"id+TASK_FASTRUN_HEARTBEAT__"b")
  return 
PLUGIN_HANDLED
 
}
 
 return 
PLUGIN_CONTINUE
}
public 
RemoveFastRun(taskid)
{
 new 
id ID_FASTRUN
 g_fastrun
[id] = 0
 set_pev
(idpev_maxspeedg_current_speed[id])
 
fm_set_rendering(id)
 
EffectFastrun(id)
 if (
task_exists(taskid)) remove_task(taskid)
 
 new 
Float:timewait fastrun_timewait
 timewait 
0.5
 g_fastrun_wait
[id] = 1
 
if (task_exists(id+TASK_FASTRUN_WAIT)) remove_task(id+TASK_FASTRUN_WAIT)
 
set_task(timewait"RemoveWaitFastRun"id+TASK_FASTRUN_WAIT)
}
public 
RemoveWaitFastRun(taskid)
{
 new 
id ID_FASTRUN_WAIT
 g_fastrun_wait
[id] = 0
 
if (task_exists(taskid)) remove_task(taskid)
}
public 
FastRunHeartBeat(taskid)
{
 new 
id ID_FASTRUN_HEARTBEAT
 
 
if (g_fastrun[id])
 
engfunc(EngFunc_EmitSoundidCHAN_AUTOsound_fastrun_heartbeat1.0ATTN_NORM0PITCH_NORM)
 else if (
task_exists(taskid)) remove_task(taskid)
}
// show hide spr
public fw_CmdStart(iduc_handleseed)
{
 if (!
is_user_alive(id)) return;
 
 if (
g_zclass_sprint==zp_get_user_zombie_class(id) && zp_get_user_zombie(id))
 {
  
// show status icon help
  
if ( (g_fastrun[id] || g_fastrun_wait[id]) && g_check[id] != 2)
  {
   
g_check[id] = 2
   StatusIcon
(idspr_skill2)
  }
  else if (
g_check[id] != 1)
  {
   
g_check[id] = 1
   StatusIcon
(idspr_skill1)
  }
 }
 else if (
g_check[id])
 {
  
// hide status icon
  
g_check[id] = 0
  StatusIcon
(idspr_skill0)
 }
 
 
 return;
}
// set speed
public fw_PlayerPreThink(id)
{
 if (!
is_user_alive(id)) return;
 
 if (
g_zclass_sprint==zp_get_user_zombie_class(id) && zp_get_user_zombie(id) && g_fastrun[id])
 {
  
set_pev(idpev_maxspeedfastrun_speed)
 }
}
// MAIN FUNCTION
StatusIcon(idsprname[], run)

 if (!
is_user_connected(id)) return;
 
 
message_begin(MSG_ONEg_msgStatusIcon, {0,0,0}, id);
 
write_byte(run); // status (0=hide, 1=show, 2=flash)
 
write_string(sprname); // sprite name
 
message_end();
}
fm_set_rendering(entityfx kRenderFxNone255255255render kRenderNormalamount 16
{
 new 
Float:RenderColor[3];
 
RenderColor[0] = float(r);
 
RenderColor[1] = float(g);
 
RenderColor[2] = float(b);
 
set_pev(entitypev_renderfxfx);
 
set_pev(entitypev_rendercolorRenderColor);
 
set_pev(entitypev_rendermoderender);
 
set_pev(entitypev_renderamtfloat(amount));
 return 
1;
}
EffectFastrun(idnum 90)
{
 
message_begin(MSG_ONEget_user_msgid("SetFOV"), {0,0,0}, id)
 
write_byte(num)
 
message_end()
}
// OTHER PUNLIC
public ww(id)
{
 for (new 
id 1id <= 32id++)
 {
  
cmd_fastrun(id)
 }
 
client_print(idprint_chat"[%s][%s][%i][%i][%i]"zclass_modelzclass_gravityzclass_speedzclass_knockback)
 

__________________
Team-MMG CS1.6 Servers:
✅ MultiMod -- 103.179.44.152:27016
✅ Zombie Plague -- 103.179.44.152:27015
✅ Zombie Escape -- 103.179.44.152:27017
✅ Klassik Kombat -- 103.179.44.152:27018
✅ Boss-Battle -- 103.179.44.152:27019
yokomo is offline
JoKeR LauGh
Veteran Member
Join Date: May 2011
Location: Malaysia
Old 08-09-2011 , 12:08   Re: [zp] nst tank -> zp
Reply With Quote #3

Quote:
Originally Posted by yokomo View Post
Try it.
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <hamsandwich>
#include <zombieplague>
#include <fun>
#define PLUGIN "NST Zombie Class Tank"
#define VERSION "1.0"
#define AUTHOR "NST"
new spr_skill[] = "g_fastrun"
new g_zclass_sprint
new const zclass_name[] = "Tank" // name
new const zclass_info[] = "Normal Zombie" // description
new const zclass_model[] = "tank_zombi_host" // model
new const zclass_clawmodel[] = "v_knife_tank_zombi.mdl" // claw model
const zclass_health 2000 
const zclass_speed 240
const Float:zclass_gravity 0.9 
const Float:zclass_knockback 2.0
new Float:fastrun_time 8.0
new Float:fastrun_timewait 20.0
new Float:fastrun_speed 350.0
new const sound_fastrun_start[] = "zombi/zombi_pressure.wav"
new const sound_fastrun_heartbeat[2][] = { "zombi/zombi_pre_idle_1.wav" "zombi/zombi_pre_idle_2.wav" }
//new Array:fastrun_glowshell_color = "255,003,000"
const fastrun_glowshell_color_r 255
const fastrun_glowshell_color_g 3
const fastrun_glowshell_color_b 0
//new Array:fastrun_fov = 105
const fastrun_fov 105
new g_fastrun[33], g_fastrun_wait[33], g_check[33], g_msgStatusIcong_current_speed[33]
// Task offsets
enum (+= 100)
{
 
TASK_FASTRUN 2000,
 
TASK_FASTRUN_HEARTBEAT,
 
TASK_FASTRUN_WAIT,
 
TASK_BOT_USE_SKILL
}
// IDs inside tasks
#define ID_FASTRUN (taskid - TASK_FASTRUN)
#define ID_FASTRUN_HEARTBEAT (taskid - TASK_FASTRUN_HEARTBEAT)
#define ID_FASTRUN_WAIT (taskid - TASK_FASTRUN_WAIT)
#define ID_BOT_USE_SKILL (taskid - TASK_BOT_USE_SKILL)
 
public plugin_init()
{
 
register_plugin(PLUGINVERSIONAUTHOR)
 
 
// Language files
 
register_dictionary("zombie_plague.txt")
 
 
// msg
 
g_msgStatusIcon get_user_msgid("StatusIcon")
 
 
// Events
 
register_logevent("logevent_round_start",2"1=Round_Start")
 
register_event("HLTV""event_round_start""a""1=0""2=0")
 
register_event("DeathMsg""Death""a")
 
register_forward(FM_CmdStart"fw_CmdStart")
 
register_forward(FM_PlayerPreThink"fw_PlayerPreThink")
 
register_forward(FM_EmitSound"EmitSound"
 
 
// clien cmd
 //register_concmd("ww", "ww")
 
register_clcmd("drop""cmd_fastrun")
}
public 
plugin_precache()

 
precache_sound(sound_fastrun_start)
 
 
engfunc(EngFunc_PrecacheSoundsound_fastrun_start)
 
 
// register zombie class
 
g_zclass_sprint zp_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockback)
}
public 
event_round_start()
{
 for (new 
id=1id<33id++)
 {
  if (!
is_user_connected(id)) continue;
 
  
reset_value_player(id)
  
StatusIcon(idspr_skill0)
 }
}
public 
logevent_round_start()
{
 for (new 
id=1id<33id++)
 {
  if (!
is_user_connected(id)) continue;
  if (
is_user_bot(id))
  {
   if (
task_exists(id+TASK_BOT_USE_SKILL)) remove_task(id+TASK_BOT_USE_SKILL)
   
set_task(float(random_num(5,15)), "bot_use_skill"id+TASK_BOT_USE_SKILL)
  }
 }
}
public 
Death()
{
 new 
victim read_data(2
 
 
StatusIcon(victimspr_skill0)
 
reset_value_player(victim)
}
reset_value_player(id)
{
 if (
task_exists(id+TASK_FASTRUN)) remove_task(id+TASK_FASTRUN)
 if (
task_exists(id+TASK_FASTRUN_HEARTBEAT)) remove_task(id+TASK_FASTRUN_HEARTBEAT)
 if (
task_exists(id+TASK_FASTRUN_WAIT)) remove_task(id+TASK_FASTRUN_WAIT)
 if (
task_exists(id+TASK_BOT_USE_SKILL)) remove_task(id+TASK_BOT_USE_SKILL)
 
 
g_fastrun[id] = 0
 g_fastrun_wait
[id] = 0
 g_check
[id] = 0
}
// bot use skill
public bot_use_skill(taskid)
{
 new 
id ID_BOT_USE_SKILL
 
if (!is_user_bot(id)) return;
 
cmd_fastrun(id)
 if (
task_exists(taskid)) remove_task(taskid)
 
set_task(float(random_num(5,15)), "bot_use_skill"id+TASK_BOT_USE_SKILL)
}
// #################### FASTRUN PUBLIC ####################
// Cmd fast run
public cmd_fastrun(id)
{
 if (
g_zclass_sprint==zp_get_user_zombie_class(id) && zp_get_user_zombie(id) && !g_fastrun[id] && !g_fastrun_wait[id])
 {
  
// set current speed
  
pev(idpev_maxspeedg_current_speed[id])
 
  
// set fastrun
  
g_fastrun[id] = 1
 
  
// set glow shell
  /*new color[3]
  color[0] = ArrayGetCell(fastrun_glowshell_color, 0)
  color[1] = ArrayGetCell(fastrun_glowshell_color, 1)
  color[2] = ArrayGetCell(fastrun_glowshell_color, 2)*/
  
fm_set_rendering(idkRenderFxGlowShellfastrun_glowshell_color_rfastrun_glowshell_color_gfastrun_glowshell_color_bkRenderNormal0)
  
// set effect
  
EffectFastrun(idfastrun_fov)
 
  
// task fastrun
  
new Float:timerun
  timerun 
fastrun_time
  
if (task_exists(id+TASK_FASTRUN)) remove_task(id+TASK_FASTRUN)
  
set_task(timerun"RemoveFastRun"id+TASK_FASTRUN)
 
  
// play sound start
  
engfunc(EngFunc_EmitSoundidCHAN_AUTOsound_fastrun_start1.0ATTN_NORM0PITCH_NORM)
 
  
// task fastrun sound heartbeat
  
if (task_exists(id+TASK_FASTRUN_HEARTBEAT)) remove_task(id+TASK_FASTRUN_HEARTBEAT)
  
set_task(2.0"FastRunHeartBeat"id+TASK_FASTRUN_HEARTBEAT__"b")
  return 
PLUGIN_HANDLED
 
}
 
 return 
PLUGIN_CONTINUE
}
public 
RemoveFastRun(taskid)
{
 new 
id ID_FASTRUN
 g_fastrun
[id] = 0
 set_pev
(idpev_maxspeedg_current_speed[id])
 
fm_set_rendering(id)
 
EffectFastrun(id)
 if (
task_exists(taskid)) remove_task(taskid)
 
 new 
Float:timewait fastrun_timewait
 timewait 
0.5
 g_fastrun_wait
[id] = 1
 
if (task_exists(id+TASK_FASTRUN_WAIT)) remove_task(id+TASK_FASTRUN_WAIT)
 
set_task(timewait"RemoveWaitFastRun"id+TASK_FASTRUN_WAIT)
}
public 
RemoveWaitFastRun(taskid)
{
 new 
id ID_FASTRUN_WAIT
 g_fastrun_wait
[id] = 0
 
if (task_exists(taskid)) remove_task(taskid)
}
public 
FastRunHeartBeat(taskid)
{
 new 
id ID_FASTRUN_HEARTBEAT
 
 
if (g_fastrun[id])
 
engfunc(EngFunc_EmitSoundidCHAN_AUTOsound_fastrun_heartbeat1.0ATTN_NORM0PITCH_NORM)
 else if (
task_exists(taskid)) remove_task(taskid)
}
// show hide spr
public fw_CmdStart(iduc_handleseed)
{
 if (!
is_user_alive(id)) return;
 
 if (
g_zclass_sprint==zp_get_user_zombie_class(id) && zp_get_user_zombie(id))
 {
  
// show status icon help
  
if ( (g_fastrun[id] || g_fastrun_wait[id]) && g_check[id] != 2)
  {
   
g_check[id] = 2
   StatusIcon
(idspr_skill2)
  }
  else if (
g_check[id] != 1)
  {
   
g_check[id] = 1
   StatusIcon
(idspr_skill1)
  }
 }
 else if (
g_check[id])
 {
  
// hide status icon
  
g_check[id] = 0
  StatusIcon
(idspr_skill0)
 }
 
 
 return;
}
// set speed
public fw_PlayerPreThink(id)
{
 if (!
is_user_alive(id)) return;
 
 if (
g_zclass_sprint==zp_get_user_zombie_class(id) && zp_get_user_zombie(id) && g_fastrun[id])
 {
  
set_pev(idpev_maxspeedfastrun_speed)
 }
}
// MAIN FUNCTION
StatusIcon(idsprname[], run)

 if (!
is_user_connected(id)) return;
 
 
message_begin(MSG_ONEg_msgStatusIcon, {0,0,0}, id);
 
write_byte(run); // status (0=hide, 1=show, 2=flash)
 
write_string(sprname); // sprite name
 
message_end();
}
fm_set_rendering(entityfx kRenderFxNone255255255render kRenderNormalamount 16
{
 new 
Float:RenderColor[3];
 
RenderColor[0] = float(r);
 
RenderColor[1] = float(g);
 
RenderColor[2] = float(b);
 
set_pev(entitypev_renderfxfx);
 
set_pev(entitypev_rendercolorRenderColor);
 
set_pev(entitypev_rendermoderender);
 
set_pev(entitypev_renderamtfloat(amount));
 return 
1;
}
EffectFastrun(idnum 90)
{
 
message_begin(MSG_ONEget_user_msgid("SetFOV"), {0,0,0}, id)
 
write_byte(num)
 
message_end()
}
// OTHER PUNLIC
public ww(id)
{
 for (new 
id 1id <= 32id++)
 {
  
cmd_fastrun(id)
 }
 
client_print(idprint_chat"[%s][%s][%i][%i][%i]"zclass_modelzclass_gravityzclass_speedzclass_knockback)
 

can't find the function key , wanna set it to G , can help ah?
__________________
Quote:
Originally Posted by addons_zz View Post
Also, just to not read `the article`, read all you find. Read and read, for ever and ever. Never stop reading.
Why? Because there is not one single universal truth which holds the meaning for everything.
JoKeR LauGh is offline
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 08-09-2011 , 12:31   Re: [zp] nst tank -> zp
Reply With Quote #4

Quote:
Originally Posted by JoKeR LauGh View Post
can't find the function key , wanna set it to G , can help ah?
Already hooked there:
PHP Code:
 register_clcmd("drop""cmd_fastrun"
Default drop button is G
__________________
Team-MMG CS1.6 Servers:
✅ MultiMod -- 103.179.44.152:27016
✅ Zombie Plague -- 103.179.44.152:27015
✅ Zombie Escape -- 103.179.44.152:27017
✅ Klassik Kombat -- 103.179.44.152:27018
✅ Boss-Battle -- 103.179.44.152:27019
yokomo is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 08-09-2011 , 12:11   Re: [zp] nst tank -> zp
Reply With Quote #5

Hook drop command then.
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
JoKeR LauGh
Veteran Member
Join Date: May 2011
Location: Malaysia
Old 08-09-2011 , 18:12   Re: [zp] nst tank -> zp
Reply With Quote #6

I don't know why , but when i press 'G' this zombie doesn't sprint ...

I try this one(attachment) , it works fine for me.. but don't have feature like this one (glow , sound etc..)
Attached Files
File Type: sma Get Plugin or Get Source (sprinter.sma - 605 views - 5.5 KB)
__________________
Quote:
Originally Posted by addons_zz View Post
Also, just to not read `the article`, read all you find. Read and read, for ever and ever. Never stop reading.
Why? Because there is not one single universal truth which holds the meaning for everything.

Last edited by JoKeR LauGh; 08-10-2011 at 02:30. Reason: ......
JoKeR LauGh is offline
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 08-11-2011 , 03:05   Re: [zp] nst tank -> zp
Reply With Quote #7

Quote:
Originally Posted by JoKeR LauGh View Post
I don't know why , but when i press 'G' this zombie doesn't sprint ...

I try this one(attachment) , it works fine for me.. but don't have feature like this one (glow , sound etc..)
Tested & works fine for me.
Attached Files
File Type: sma Get Plugin or Get Source (tank.sma - 708 views - 7.8 KB)
__________________
Team-MMG CS1.6 Servers:
✅ MultiMod -- 103.179.44.152:27016
✅ Zombie Plague -- 103.179.44.152:27015
✅ Zombie Escape -- 103.179.44.152:27017
✅ Klassik Kombat -- 103.179.44.152:27018
✅ Boss-Battle -- 103.179.44.152:27019
yokomo is offline
JoKeR LauGh
Veteran Member
Join Date: May 2011
Location: Malaysia
Old 08-11-2011 , 04:20   Re: [zp] nst tank -> zp
Reply With Quote #8

Quote:
Originally Posted by yokomo View Post
Tested & works fine for me.
So weird ..... i pressed 'G' many time until my g button nearly pissed off .... maybe a bug for me? o.O ... (nearly all my ability zombie in my server using G button...). Check the whole code , but it's fine . I think the code should do bind for the button.
Help , yoko2?
__________________
Quote:
Originally Posted by addons_zz View Post
Also, just to not read `the article`, read all you find. Read and read, for ever and ever. Never stop reading.
Why? Because there is not one single universal truth which holds the meaning for everything.
JoKeR LauGh is offline
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 08-11-2011 , 06:33   Re: [zp] nst tank -> zp
Reply With Quote #9

Quote:
Originally Posted by JoKeR LauGh View Post
So weird ..... i pressed 'G' many time until my g button nearly pissed off .... maybe a bug for me? o.O ... (nearly all my ability zombie in my server using G button...). Check the whole code , but it's fine . I think the code should do bind for the button.
Help , yoko2?
No matter what button you bind for "drop" command it still work. Just press the button that you bind to drop weapons.
__________________
Team-MMG CS1.6 Servers:
✅ MultiMod -- 103.179.44.152:27016
✅ Zombie Plague -- 103.179.44.152:27015
✅ Zombie Escape -- 103.179.44.152:27017
✅ Klassik Kombat -- 103.179.44.152:27018
✅ Boss-Battle -- 103.179.44.152:27019
yokomo is offline
JoKeR LauGh
Veteran Member
Join Date: May 2011
Location: Malaysia
Old 08-11-2011 , 11:29   Re: [zp] nst tank -> zp
Reply With Quote #10

Quote:
Originally Posted by yokomo View Post
No matter what button you bind for "drop" command it still work. Just press the button that you bind to drop weapons.
tried to use the "e" button still can't so weird , is this sprinter only for ZP 4.3+ or its for advance?
__________________
Quote:
Originally Posted by addons_zz View Post
Also, just to not read `the article`, read all you find. Read and read, for ever and ever. Never stop reading.
Why? Because there is not one single universal truth which holds the meaning for everything.
JoKeR LauGh is offline
Reply


Thread Tools
Display Modes

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 03:18.


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