[Hammer_Knife][NEW]
[Hammer_Knife][NEW]
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!
Resources: Models,sounds i dont have sprites!
Link:
https://www.mediafire.com/?7495uc2djpsapo7
Thanks!
-
- Veteran Member
- Posts: 678
- Joined: 7 years ago
- Location: Paraguay
- Contact:
Just use this knife menu made by Jack
It has hammer as well
http://escapers-zone.xyz/viewtopic.php?f=15&t=88
It has hammer as well
http://escapers-zone.xyz/viewtopic.php?f=15&t=88
Nobody Is That Busy If They Make Time
No he havent models,sounds and i want this only VIP please can u make it for me bro ? :/
-
- Veteran Member
- Posts: 678
- Joined: 7 years ago
- Location: Paraguay
- Contact:
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
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)
}
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)
}
-
- Veteran Member
- Posts: 678
- Joined: 7 years ago
- Location: Paraguay
- Contact:
U don't want The Knife Menu ? Just Hammer from Knife Menu?
Nobody Is That Busy If They Make Time
-
- Veteran Member
- Posts: 678
- Joined: 7 years ago
- Location: Paraguay
- Contact:
Nobody Is That Busy If They Make Time
- Night Fury
- Mod Developer
- Posts: 677
- Joined: 7 years ago
- Contact:
Try:
Change VIP access from:
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")
}
}
}
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
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
Jack this code have some error test it by urself and tell us!
- Night Fury
- Mod Developer
- Posts: 677
- Joined: 7 years ago
- Contact:
I didn't try to compile..It's my bad.
Try this:
Try this:
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_sound(hammer_sounds[h])
precache_sound(g_sound_knife)
}
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_game(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
new i
for(i = 0; i < charsmax(hammer_sounds); i++)
for(i = 0; i < charsmax(oldknife_sounds); i++)
{
if(equal(sound, oldknife_sounds[i]))
{
if (g_Hammer[id])
{
emit_sound(id, channel, hammer_sounds[i], 1.0, ATTN_NORM, 0, PITCH_NORM)
}
else
{
emit_sound(id, channel, oldknife_sounds[i], 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")
}
}
}
This is 2d array with only one brackets?
- new const hammer_sounds[] =
- {
- "weapons/hammer_deploy.wav",
- "weapons/hammer_hit.wav",
- "weapons/hammer_hitwall.wav",
- "weapons/hammer_slash.wav",
- "weapons/hammer_stab.wav"
- }
He who fails to plan is planning to fail
-
- Veteran Member
- Posts: 678
- Joined: 7 years ago
- Location: Paraguay
- Contact:
U said Only Hammer Knife -_- .... Read what u post
That Is why for u Converting Hammer knife For VIP extra Item Is Suitable ....
Removing The code from Knife Menu and Just taking hammer?
Na It is waste of time
So what do u want ?
U want Hammer To be with vips automatically without buying it?
Then best choice Is Knife Menu
Try Jack's code
Nobody Is That Busy If They Make Time
- Night Fury
- Mod Developer
- Posts: 677
- Joined: 7 years ago
- Contact:
Updated the code.
Yes jhonny automatically
Jack i have a probleme in my server :/ i cant see weapons menu i said guns /guns enable /enable i cant this menu and my friends see it :/
and look at this code u gave me for hammer
06/24/2017 - 12:00:14: Invalid index 10 (count: 10)
L 06/24/2017 - 12:00:14: [AMXX] Run time error 10 (plugin "ze_weapon_menu.amxx") (native "ArrayGetString") - debug not enabled!
L 06/24/2017 - 12:00:14: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
FATAL ERROR (shutting down): SV_ModelIndex: SV_ModelIndex: model models/zombie_escape/p_hammer_storm.mdl not precached
and look at this code u gave me for hammer
06/24/2017 - 12:00:14: Invalid index 10 (count: 10)
L 06/24/2017 - 12:00:14: [AMXX] Run time error 10 (plugin "ze_weapon_menu.amxx") (native "ArrayGetString") - debug not enabled!
L 06/24/2017 - 12:00:14: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
FATAL ERROR (shutting down): SV_ModelIndex: SV_ModelIndex: model models/zombie_escape/p_hammer_storm.mdl not precached
- Night Fury
- Mod Developer
- Posts: 677
- Joined: 7 years ago
- Contact:
Because of being idiot i won't help.
Closed.
Closed.
Who is online
Users browsing this forum: No registered users and 4 guests