[Hammer_Knife][NEW]

Unpaid Requests, Public Plugins
User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 633
Joined: 2 Years Ago
Location: Tunisia
Has thanked: 14 times
Been thanked: 7 times
Age: 20
Contact:

[Hammer_Knife][NEW]

#1

Post by Spir0x » 2 Years Ago

Hello can anyone can make a Plugin named ze_hammer_storm only for VIP !! i think it's nice

Resources: Models,sounds i dont have sprites!

Link:
https://www.mediafire.com/?7495uc2djpsapo7

Thanks!
I trynna make money, not friends.

johnnysins2000
Veteran Member
Veteran Member
Pakistan
Posts: 672
Joined: 2 Years Ago
Location: Lahore
Has thanked: 11 times
Been thanked: 10 times
Age: 23
Contact:

#2

Post by johnnysins2000 » 2 Years Ago

Just use this knife menu made by Jack
It has hammer as well

viewtopic.php?f=15&t=88
Nobody Is That Busy If They Make Time :roll:

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 633
Joined: 2 Years Ago
Location: Tunisia
Has thanked: 14 times
Been thanked: 7 times
Age: 20
Contact:

#3

Post by Spir0x » 2 Years Ago

No he havent models,sounds and i want this only VIP please can u make it for me bro ? :/
I trynna make money, not friends.

johnnysins2000
Veteran Member
Veteran Member
Pakistan
Posts: 672
Joined: 2 Years Ago
Location: Lahore
Has thanked: 11 times
Been thanked: 10 times
Age: 23
Contact:

#4

Post by johnnysins2000 » 2 Years Ago

Spir0x wrote:
2 Years Ago
No he havent models,sounds and i want this only VIP please can u make it for me bro ? :/
u can change the models from editing the sma.....
and about making hammer for vip ... u just need to put an check ...

just post here the sma of knife menu by jack

and i will edit it for you but the models ? u will do that for yourself
Nobody Is That Busy If They Make Time :roll:

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 633
Joined: 2 Years Ago
Location: Tunisia
Has thanked: 14 times
Been thanked: 7 times
Age: 20
Contact:

#5

Post by Spir0x » 2 Years Ago

Here you are knife menu by jack but i said i want it only for vip not on knife menu i won"t make knife menu.

and how models you speaking about ? you can put these bro!

http://www.mediafire.com/file/7495uc2dj ... _storm.rar

That's the code of knife menu of jack and make sure bro to delete that axe & strong knifes just HAMMER FOR VIP


#include <zombie_escape>

#define is_user_valid(%1) (is_user_alive(%1) && !is_user_bot(%1) && !is_user_hltv(%1))

new const Hammer_Models[][] = { "models/zombie_escape/v_knife_hammer.mdl", "models/zombie_escape/p_knife_hammer.mdl" }
new const Katana_Models[][] = { "models/zombie_escape/v_knife_katana.mdl", "models/zombie_escape/p_knife_katana.mdl" }
new const Compat_Models[][] = { "models/zombie_escape/v_knife_compat.mdl", "models/zombie_escape/p_knife_compat.mdl" }
new const Strong_Models[][] = { "models/zombie_escape/v_knife_strong.mdl", "models/zombie_escape/p_knife_strong.mdl" }
new const g_sound_knife[] = { "items/gunpickup2.wav" }
new const combat_sounds[][] =
{
"ZM_Land/combat_deploy.wav",
"ZM_Land/combat_hit.wav",
"ZM_Land/combat_hit.wav",
"ZM_Land/combat_hit.wav",
"ZM_Land/combat_hit.wav",
"ZM_Land/combat_hitwall.wav",
"ZM_Land/combat_slash.wav",
"ZM_Land/combat_slash.wav",
"ZM_Land/combat_stab.wav"
}

new const strong_sounds[][] =
{
"ZM_Land/strong_deploy.wav",
"ZM_Land/strong_hit.wav",
"ZM_Land/strong_hit.wav",
"ZM_Land/strong_hit.wav",
"ZM_Land/strong_hit.wav",
"ZM_Land/strong_hitwall.wav",
"ZM_Land/strong_slash.wav",
"ZM_Land/strong_slash.wav",
"ZM_Land/strong_stab.wav"
}

new const axe_sounds[][] =
{
"ZM_Land/axe_deploy.wav",
"ZM_Land/axe_hit.wav",
"ZM_Land/axe_hit.wav",
"ZM_Land/axe_hit.wav",
"ZM_Land/axe_hit.wav",
"ZM_Land/axe_hitwall.wav",
"ZM_Land/axe_slash.wav",
"ZM_Land/axe_slash.wav",
"ZM_Land/axe_stab.wav"
}

new const katana_sounds[][] =
{
"ZM_Land/katana_deploy.wav",
"ZM_Land/katana_hit.wav",
"ZM_Land/katana_hit.wav",
"ZM_Land/katana_hit.wav",
"ZM_Land/katana_hit.wav",
"ZM_Land/katana_hitwall.wav",
"ZM_Land/katana_slash.wav",
"ZM_Land/katana_slash.wav",
"ZM_Land/katana_stab.wav"
}

new const hammer_sounds[][] =
{
"ZM_Land/hammer_deploy.wav",
"ZM_Land/hammer_hit.wav",
"ZM_Land/hammer_hit.wav",
"ZM_Land/hammer_hit.wav",
"ZM_Land/hammer_hit.wav",
"ZM_Land/hammer_hitwall.wav",
"ZM_Land/hammer_slash.wav",
"ZM_Land/hammer_slash.wav",
"ZM_Land/hammer_stab.wav"
}

new const oldknife_sounds[][] =
{
"weapons/knife_deploy1.wav",
"weapons/knife_hit1.wav",
"weapons/knife_hit2.wav",
"weapons/knife_hit3.wav",
"weapons/knife_hit4.wav",
"weapons/knife_hitwall1.wav",
"weapons/knife_slash1.wav",
"weapons/knife_slash2.wav",
"weapons/knife_stab.wav"
}

new g_Hammer[33], g_Katana[33], g_Compat[33], g_Strong[33], bool:Opened[33]

public plugin_precache()
{
new g
for(g = 0; g < sizeof(Hammer_Models); g++)
precache_model(Hammer_Models[g])
for(g = 0; g < sizeof(Katana_Models); g++)
precache_model(Katana_Models[g])
for(g = 0; g < sizeof(Compat_Models); g++)
precache_model(Compat_Models[g])
for(g = 0; g < sizeof(Strong_Models); g++)
precache_model(Strong_Models[g])

precache_sound(g_sound_knife)

for(g = 0; g < sizeof(combat_sounds); g++)
precache_sound(combat_sounds[g])

for(g = 0; g < sizeof(strong_sounds); g++)
precache_sound(strong_sounds[g])

for(g = 0; g < sizeof(axe_sounds); g++)
precache_sound(axe_sounds[g])

for(g = 0; g < sizeof(katana_sounds); g++)
precache_sound(katana_sounds[g])

for(g = 0; g < sizeof(hammer_sounds); g++)
precache_sound(hammer_sounds[g])
}

public plugin_natives()
{
register_native("ze_open_knife_menu", "native_ze_open_knife_menu", 1)
}

public plugin_init()
{
register_plugin("[ZE] Addon: Knife Menu", "1.1", "Jack GamePlay")
register_clcmd("say /knife", "open_knife_menu")
register_clcmd("say knife", "open_knife_menu")

register_forward(FM_EmitSound, "fw_EmitSound")

register_message(get_user_msgid("DeathMsg"), "DeathMsg")
register_event("CurWeapon", "CurrentWeapon", "be", "1=1")
register_event("HLTV", "New_Round", "a", "1=0", "2=0")

RegisterHookChain(RG_CBasePlayer_Spawn, "Fw_Spawn", 1)
}

public New_Round()
{
for(new i = 0; i < get_maxplayers()
{
Opened = false
}
}

public client_putinserver(id)
{
Fw_Spawn(id)
}

public client_disconnect(id)
{
g_Compat[id] = false
g_Hammer[id] = false
g_Katana[id] = false
g_Strong[id] = false
Opened[id] = false
}

public ze_user_infected(iVictim)
{
cs_reset_player_view_model(iVictim, CSW_KNIFE)
cs_reset_player_weap_model(iVictim, CSW_KNIFE)
}

public Fw_Spawn(id)
{
if(ze_is_user_zombie(id) || !is_user_valid(id))
return

set_task(5.0, "open_knife_menu", id)
}

public open_knife_menu(id)
{
if(!Opened[id] && !ze_is_user_zombie(id) && is_user_valid(id))
{
Show_Knife_Menu(id)
Opened[id] = true
}
else if(ze_is_user_zombie(id))
{
ze_colored_print(id, "You can't open knife menu due to being zombie.")
return PLUGIN_HANDLED
}
else if(Opened[id])
{
ze_colored_print(id, "You've opened knife menu already, wait next round.")
return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
}

public Show_Knife_Menu(id)
{
new menu = menu_create("Knife Menu: Choose Your Knife", "Knife_Menu_Functions")
menu_additem(menu, "Compat", "1", 0)
menu_additem(menu, "Strong", "2", 0)
menu_additem(menu, "Katana", "3", 0)
menu_additem(menu, "Hammer", "4", 0)
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
menu_display(id, menu, 0)
}

public Knife_Menu_Functions(id, menu, key)
{
if(!is_user_valid(id) || ze_is_user_zombie(id))
return

switch(menu)
{
case 0: // Compat
{
g_Compat[id] = true
g_Hammer[id] = false
g_Katana[id] = false
g_Strong[id] = false
Opened[id] = true
emit_sound(id, CHAN_BODY, g_sound_knife, 1.0, ATTN_NORM, 0, PITCH_NORM)
}
case 1: // Strong
{
g_Compat[id] = false
g_Hammer[id] = false
g_Katana[id] = false
g_Strong[id] = true
Opened[id] = true
emit_sound(id, CHAN_BODY, g_sound_knife, 1.0, ATTN_NORM, 0, PITCH_NORM)
}
case 2: // Katana
{
g_Compat[id] = false
g_Hammer[id] = false
g_Katana[id] = true
g_Strong[id] = false
Opened[id] = true
emit_sound(id, CHAN_BODY, g_sound_knife, 1.0, ATTN_NORM, 0, PITCH_NORM)
}
case 3: // Hammer
{
g_Compat[id] = false
g_Hammer[id] = true
g_Katana[id] = false
g_Strong[id] = false
Opened[id] = true
emit_sound(id, CHAN_BODY, g_sound_knife, 1.0, ATTN_NORM, 0, PITCH_NORM)
}
}
menu_destroy(menu)
}

public fw_EmitSound(id, channel, const sound[])
{
if(!is_user_valid(id) || ze_is_user_zombie(id))
return FMRES_IGNORED

new i
for(i = 0; i < sizeof(combat_sounds); i++)
for(i = 0; i < sizeof(strong_sounds); i++)
for(i = 0; i < sizeof(axe_sounds); i++)
for(i = 0; i < sizeof(katana_sounds); i++)
for(i = 0; i < sizeof(hammer_sounds); i++)
{
if(equal(sound, oldknife_sounds))
{
if (g_Compat[id])
{
emit_sound(id, channel, combat_sounds, 1.0, ATTN_NORM, 0, PITCH_NORM)
return FMRES_SUPERCEDE
}
else if (g_Strong[id])
{
emit_sound(id, channel, strong_sounds, 1.0, ATTN_NORM, 0, PITCH_NORM)
return FMRES_SUPERCEDE
}
else if (g_Katana[id])
{
emit_sound(id, channel, katana_sounds, 1.0, ATTN_NORM, 0, PITCH_NORM)
return FMRES_SUPERCEDE
}
else if (g_Hammer[id])
{
emit_sound(id, channel, hammer_sounds, 1.0, ATTN_NORM, 0, PITCH_NORM)
return FMRES_SUPERCEDE
}
else if (!g_Compat[id] || !g_Strong[id] || !g_Katana[id] || !g_Hammer[id])
{
emit_sound(id, channel, oldknife_sounds, 1.0, ATTN_NORM, 0, PITCH_NORM)
return FMRES_SUPERCEDE
}
}
}
return FMRES_IGNORED
}

public CurrentWeapon(id)
{
if(!is_user_valid(id) || ze_is_user_zombie(id))
return

if(get_user_weapon(id) & CSW_KNIFE)
{
if(g_Compat[id])
{
cs_set_player_view_model(id, CSW_KNIFE, Compat_Models[0])
cs_set_player_weap_model(id, CSW_KNIFE, Compat_Models[1])
}
else if(g_Strong[id])
{
cs_set_player_view_model(id, CSW_KNIFE, Strong_Models[0])
cs_set_player_weap_model(id, CSW_KNIFE, Strong_Models[1])
}
else if(g_Katana[id])
{
cs_set_player_view_model(id, CSW_KNIFE, Katana_Models[0])
cs_set_player_weap_model(id, CSW_KNIFE, Katana_Models[1])
}
else if(g_Hammer[id])
{
cs_set_player_view_model(id, CSW_KNIFE, Hammer_Models[0])
cs_set_player_weap_model(id, CSW_KNIFE, Hammer_Models[1])
}
}
}

public DeathMsg(msg_id, msg_dest, id)
{
static szTruncatedWeapon[33], iAttacker
get_msg_arg_string(4, szTruncatedWeapon, charsmax(szTruncatedWeapon))
iAttacker = get_msg_arg_int(1)

if(!is_user_valid(iAttacker) || iAttacker == get_msg_arg_int(2) || !is_user_valid(get_msg_arg_int(2))) // get_msg_arg_int(2) = iVictim
return

if(equal(szTruncatedWeapon, "knife") && get_user_weapon(iAttacker) & CSW_KNIFE)
{
if(g_Compat[id])
{
set_msg_arg_string(4, "compat")
}
else if(g_Strong[id])
{
set_msg_arg_string(4, "strong")
}
else if(g_Katana[id])
{
set_msg_arg_string(4, "katana")
}
else if(g_Hammer[id])
{
set_msg_arg_string(4, "hammer")
}
}
}

public native_ze_open_knife_menu()
{
new id = get_param(1)
open_knife_menu(id)
}
I trynna make money, not friends.

johnnysins2000
Veteran Member
Veteran Member
Pakistan
Posts: 672
Joined: 2 Years Ago
Location: Lahore
Has thanked: 11 times
Been thanked: 10 times
Age: 23
Contact:

#6

Post by johnnysins2000 » 2 Years Ago

U don't want The Knife Menu ? Just Hammer from Knife Menu?
Nobody Is That Busy If They Make Time :roll:

johnnysins2000
Veteran Member
Veteran Member
Pakistan
Posts: 672
Joined: 2 Years Ago
Location: Lahore
Has thanked: 11 times
Been thanked: 10 times
Age: 23
Contact:

#7

Post by johnnysins2000 » 2 Years Ago

https://zombie-mod.ru/counter-strike/zo ... ammer.html

Here I will convert this for you ok?
Nobody Is That Busy If They Make Time :roll:

User avatar
Mohamed Alaa
Mod Developer
Mod Developer
Egypt
Posts: 626
Joined: 2 Years Ago
Location: Egypt
Has thanked: 34 times
Been thanked: 49 times
Age: 20
Contact:

#8

Post by Mohamed Alaa » 2 Years Ago

Try:

Change VIP access from:

Code: Select all

#define VIP_ACCESS ADMIN_LEVEL_H

Code: Select all

#include <zombie_escape>

#define VIP_ACCESS ADMIN_LEVEL_H

new const Hammer_Models[][] = { "models/zombie_escape/v_hammer_storm.mdl", "models/zombie_escape/p_hammer_storm.mdl" }
new const g_sound_knife[] = { "items/gunpickup2.wav" }
new const hammer_sounds[][] =
{
	"weapons/hammer_deploy.wav",
	"weapons/hammer_hit.wav",
	"weapons/hammer_hitwall.wav",
	"weapons/hammer_slash.wav",
	"weapons/hammer_stab.wav"
}
new const oldknife_sounds[][] =
{
	"weapons/knife_deploy1.wav",
	"weapons/knife_hit1.wav",
	"weapons/knife_hit2.wav",
	"weapons/knife_hit3.wav",
	"weapons/knife_hit4.wav",
	"weapons/knife_hitwall1.wav",
	"weapons/knife_slash1.wav",
	"weapons/knife_slash2.wav",
	"weapons/knife_stab.wav"
}

new g_Hammer[33]

public plugin_precache()
{
	for(new g = 0; g < charsmax(Hammer_Models); g++)
		precache_model(Hammer_Models[g])
		
	for(new h = 0; h < charsmax(hammer_sounds); h++)
		precache_model(hammer_sounds[h])
}

public plugin_init()
{
	register_plugin("[ZE] Addons: VIP Storm Hammer", "1.0", "Jack")
	
	register_forward(FM_EmitSound, "Fw_EmitSound")
	
	register_message(get_user_msgid("DeathMsg"), "DeathMsg")
	
	register_event("CurWeapon", "CurrentWeapon", "be", "1=1")
	register_event("HLTV", "New_Round", "a", "1=0", "2=0")
}

public New_Round()
{
	for (new i = 1; i <= get_member(m_nMaxPlayers); i++)
	{
		if (!is_user_alive(i) || get_user_flags(i) & VIP_ACCESS || ze_is_user_zombie(i))
			continue
			
		g_Hammer[i] = false
	}
}

public client_putinserver(id)
{
	g_Hammer[id] = false
}

public client_disconnect(id)
{
	g_Hammer[id] = false
}

public ze_user_infected(iVictim)
{
	cs_reset_player_view_model(iVictim, CSW_KNIFE)
	cs_reset_player_weap_model(iVictim, CSW_KNIFE)
}

public ze_user_humanized(id)
{
	if(ze_is_user_zombie(id) || !is_user_alive(id))
		return
	
	if (get_user_flags(id) & VIP_ACCESS)
	{
		g_Hammer[id] = true
		emit_sound(id, CHAN_BODY, g_sound_knife, 1.0, ATTN_NORM, 0, PITCH_NORM)
	}
}

public Fw_EmitSound(id, channel, const sound[])
{
	if(!is_user_alive(id) || ze_is_user_zombie(id))
		return FMRES_IGNORED
	
	for(i = 0; i < sizeof(hammer_sounds); i++)
	{
		if(equal(sound, oldknife_sounds))
		{
			if (g_Hammer[id])
			{
				emit_sound(id, channel, hammer_sounds, 1.0, ATTN_NORM, 0, PITCH_NORM)
			}
			else
			{
				emit_sound(id, channel, oldknife_sounds, 1.0, ATTN_NORM, 0, PITCH_NORM)
			}
			return FMRES_SUPERCEDE
		}
	}
	return FMRES_IGNORED
}

public CurrentWeapon(id)
{
	if(!is_user_alive(id) || ze_is_user_zombie(id))
		return
		
	if(g_Hammer[id])
	{
		cs_set_player_view_model(id, CSW_KNIFE, Hammer_Models[0])
		cs_set_player_weap_model(id, CSW_KNIFE, Hammer_Models[1])
	}
}

public DeathMsg(msg_id, msg_dest, id)
{
	static szTruncatedWeapon[33], iAttacker, iVictim
	get_msg_arg_string(4, szTruncatedWeapon, charsmax(szTruncatedWeapon))
	iAttacker = get_msg_arg_int(1)
	iVictim = get_msg_arg_int(2)
	
	if(!is_user_alive(iAttacker) || iAttacker == iVictim || !is_user_connected(iVictim)) // get_msg_arg_int(2) = iVictim
		return
	
	if(equal(szTruncatedWeapon, "knife") && get_user_weapon(iAttacker) & CSW_KNIFE)
	{
		if(g_Hammer[id])
		{
			set_msg_arg_string(4, "storm hammer")
		}
	}
}
Want your own mod edition? PM me.
Accepting web projects.
CS 1.6 hosting: powergamingtech.com

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 633
Joined: 2 Years Ago
Location: Tunisia
Has thanked: 14 times
Been thanked: 7 times
Age: 20
Contact:

#9

Post by Spir0x » 2 Years Ago

Jhonny u dont know how to read ?
Here you are knife menu by jack but i said i want it only for vip not on knife menu i won"t make knife menu. ONLY VOP VIP
I trynna make money, not friends.

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 633
Joined: 2 Years Ago
Location: Tunisia
Has thanked: 14 times
Been thanked: 7 times
Age: 20
Contact:

#10

Post by Spir0x » 2 Years Ago

Jack this code have some error test it by urself and tell us!
I trynna make money, not friends.

Locked

Who is online

Users browsing this forum: No registered users and 1 guest