- #include <zombie_escape>
- #include <ze_levels>
- // Models
- new const g_szKnife1[][] =
- {
- "models/dg/v_knife_griff.mdl",
- "models/dg/p_knife_griff1.mdl"
- }
- new const g_szKnife2[][] =
- {
- "models/dg/v_flip_t.mdl",
- "models/dg/p_flip_t.mdl"
- }
- new const g_szKnife3[][] =
- {
- "models/dg/v_butterfly_knife.mdl",
- "models/dg/p_butterfly_knife.mdl"
- }
- new const g_szKnife4[][] =
- {
- "models/dg/v_bayonet.mdl",
- "models/dg/p_bayonet.mdl"
- }
- new const g_szKnife5[][] =
- {
- "models/dg/v_knife_karambit.mdl",
- "models/dg/p_knife_karambit.mdl"
- }
- new const g_szKnife6[][] =
- {
- "models/dg/v_knife_karambit.mdl",
- "models/dg/p_knife_karambit.mdl"
- }
- new const g_szKnife7[][] =
- {
- "models/dg/v_knifew.mdl",
- "models/dg/p_knifew.mdl"
- }
- new const g_szKnife8[][] =
- {
- "models/dg/v_knifew.mdl",
- "models/dg/p_knifew.mdl"
- }
- // Sounds
- new const g_szKnife1Sounds[][] =
- {
- "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 const g_szKnife2Sounds[][] =
- {
- "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 const g_szKnife3Sounds[][] =
- {
- "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 const g_szKnife4Sounds[][] =
- {
- "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 const g_szKnife5Sounds[][] =
- {
- "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 const g_szKnife6Sounds[][] =
- {
- "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 const g_szKnife7Sounds[][] =
- {
- "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 const g_szKnife8Sounds[][] =
- {
- "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 const g_szDefaultSounds[][] =
- {
- "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"
- }
- // Models indexes
- enum
- {
- V_Model = 0,
- P_Model
- }
- public plugin_init()
- {
- register_plugin("Knife Levels", "1.0", "lux")
- // Fakemeta
- register_forward(FM_EmitSound, "Fw_EmitSound")
- }
- public plugin_precache()
- {
- new iIndex;
- // Prechace models
- for(iIndex = 0; iIndex <= charsmax(g_szKnife1); iIndex++)
- precache_model(g_szKnife1[iIndex])
- for(iIndex = 0; iIndex <= charsmax(g_szKnife2); iIndex++)
- precache_model(g_szKnife2[iIndex])
- for(iIndex = 0; iIndex <= charsmax(g_szKnife3); iIndex++)
- precache_model(g_szKnife3[iIndex])
- for(iIndex = 0; iIndex <= charsmax(g_szKnife4); iIndex++)
- precache_model(g_szKnife4[iIndex])
- for(iIndex = 0; iIndex <= charsmax(g_szKnife5); iIndex++)
- precache_model(g_szKnife5[iIndex])
- for(iIndex = 0; iIndex <= charsmax(g_szKnife6); iIndex++)
- precache_model(g_szKnife6[iIndex])
- for(iIndex = 0; iIndex <= charsmax(g_szKnife7); iIndex++)
- precache_model(g_szKnife7[iIndex])
- for(iIndex = 0; iIndex <= charsmax(g_szKnife8); iIndex++)
- precache_model(g_szKnife8[iIndex])
- // Prechace sounds
- for(iIndex = 0; iIndex <= charsmax(g_szKnife1Sounds); iIndex++)
- precache_sound(g_szKnife1Sounds[iIndex])
- for(iIndex = 0; iIndex <= charsmax(g_szKnife1Sounds); iIndex++)
- precache_sound(g_szKnife1Sounds[iIndex])
- }
- public ze_user_humanized(id)
- {
- if (ze_get_user_level(id) >= 0 && ze_get_user_level(id) < 4)
- {
- // Player level from 1 to 5 set him this knife
- cs_set_player_view_model(id, CSW_KNIFE, g_szKnife1[V_Model])
- cs_set_player_weap_model(id, CSW_KNIFE, g_szKnife1[P_Model])
- ResetKnife(id)
- }
- else if (ze_get_user_level(id) >= 5 && ze_get_user_level(id) < 9)
- {
- // Player level from 5 to 8 set him this knife
- cs_set_player_view_model(id, CSW_KNIFE, g_szKnife2[V_Model])
- cs_set_player_weap_model(id, CSW_KNIFE, g_szKnife2[P_Model])
- ResetKnife(id)
- }
- else if (ze_get_user_level(id) >= 10 && ze_get_user_level(id) < 14)
- {
- // Player level from 5 to 8 set him this knife
- cs_set_player_view_model(id, CSW_KNIFE, g_szKnife3[V_Model])
- cs_set_player_weap_model(id, CSW_KNIFE, g_szKnife3[P_Model])
- ResetKnife(id)
- }
- else if (ze_get_user_level(id) >= 15 && ze_get_user_level(id) < 19)
- {
- // Player level from 5 to 8 set him this knife
- cs_set_player_view_model(id, CSW_KNIFE, g_szKnife4[V_Model])
- cs_set_player_weap_model(id, CSW_KNIFE, g_szKnife4[P_Model])
- ResetKnife(id)
- }
- else if (ze_get_user_level(id) >= 20 && ze_get_user_level(id) < 24)
- {
- // Player level from 26 to 30 set him this knife
- cs_set_player_view_model(id, CSW_KNIFE, g_szKnife5[V_Model])
- cs_set_player_weap_model(id, CSW_KNIFE, g_szKnife5[P_Model])
- ResetKnife(id)
- }
- else if (ze_get_user_level(id) >= 25 && ze_get_user_level(id) < 29)
- {
- // Player level from 26 to 30 set him this knife
- cs_set_player_view_model(id, CSW_KNIFE, g_szKnife6[V_Model])
- cs_set_player_weap_model(id, CSW_KNIFE, g_szKnife6[P_Model])
- ResetKnife(id)
- }
- else if (ze_get_user_level(id) >= 30 && ze_get_user_level(id) < 50)
- {
- // Player level from 26 to 30 set him this knife
- cs_set_player_view_model(id, CSW_KNIFE, g_szKnife7[V_Model])
- cs_set_player_weap_model(id, CSW_KNIFE, g_szKnife7[P_Model])
- ResetKnife(id)
- }
- }
- public ResetKnife(id)
- {
- rg_remove_item(id, "weapon_knife")
- rg_give_item(id, "weapon_knife", GT_APPEND)
- engclient_cmd(id, "weapon_knife")
- emit_sound(id, CHAN_BODY, "items/gunpickup2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- }
- public Fw_EmitSound(id, iChannel, const szSound[])
- {
- if(!is_user_alive(id) || ze_is_user_zombie(id))
- return FMRES_IGNORED
- if (ze_get_user_level(id) >= 0 && ze_get_user_level(id) < 0)
- {
- for(new iIndex = 0; iIndex <= charsmax(g_szDefaultSounds); iIndex++)
- {
- if (equal(g_szDefaultSounds[iIndex], szSound))
- {
- emit_sound(id, iChannel, g_szKnife1Sounds[iIndex], 1.0, ATTN_NORM, 0, PITCH_NORM)
- return FMRES_SUPERCEDE
- }
- }
- }
- else if (ze_get_user_level(id) >= 0 && ze_get_user_level(id) < 5)
- {
- for(new iIndex = 0; iIndex <= charsmax(g_szDefaultSounds); iIndex++)
- {
- if (equal(g_szDefaultSounds[iIndex], szSound))
- {
- emit_sound(id, iChannel, g_szKnife2Sounds[iIndex], 1.0, ATTN_NORM, 0, PITCH_NORM)
- return FMRES_SUPERCEDE
- }
- }
- }
- else if (ze_get_user_level(id) >= 5 && ze_get_user_level(id) < 9)
- {
- for(new iIndex = 0; iIndex <= charsmax(g_szDefaultSounds); iIndex++)
- {
- if (equal(g_szDefaultSounds[iIndex], szSound))
- {
- emit_sound(id, iChannel, g_szKnife3Sounds[iIndex], 1.0, ATTN_NORM, 0, PITCH_NORM)
- return FMRES_SUPERCEDE
- }
- }
- }
- else if (ze_get_user_level(id) >= 10 && ze_get_user_level(id) < 14)
- {
- for(new iIndex = 0; iIndex <= charsmax(g_szDefaultSounds); iIndex++)
- {
- if (equal(g_szDefaultSounds[iIndex], szSound))
- {
- emit_sound(id, iChannel, g_szKnife4Sounds[iIndex], 1.0, ATTN_NORM, 0, PITCH_NORM)
- return FMRES_SUPERCEDE
- }
- }
- }
- else if (ze_get_user_level(id) >= 15 && ze_get_user_level(id) < 20)
- {
- for(new iIndex = 0; iIndex <= charsmax(g_szDefaultSounds); iIndex++)
- {
- if (equal(g_szDefaultSounds[iIndex], szSound))
- {
- emit_sound(id, iChannel, g_szKnife5Sounds[iIndex], 1.0, ATTN_NORM, 0, PITCH_NORM)
- return FMRES_SUPERCEDE
- }
- }
- }
- else if (ze_get_user_level(id) >= 21 && ze_get_user_level(id) < 30)
- {
- for(new iIndex = 0; iIndex <= charsmax(g_szDefaultSounds); iIndex++)
- {
- if (equal(g_szDefaultSounds[iIndex], szSound))
- {
- emit_sound(id, iChannel, g_szKnife6Sounds[iIndex], 1.0, ATTN_NORM, 0, PITCH_NORM)
- return FMRES_SUPERCEDE
- }
- }
- }
- else if (ze_get_user_level(id) >= 31 && ze_get_user_level(id) < 40)
- {
- for(new iIndex = 0; iIndex <= charsmax(g_szDefaultSounds); iIndex++)
- {
- if (equal(g_szDefaultSounds[iIndex], szSound))
- {
- emit_sound(id, iChannel, g_szKnife7Sounds[iIndex], 1.0, ATTN_NORM, 0, PITCH_NORM)
- return FMRES_SUPERCEDE
- }
- }
- }
- else if (ze_get_user_level(id) >= 49 && ze_get_user_level(id) < 50)
- {
- for(new iIndex = 0; iIndex <= charsmax(g_szDefaultSounds); iIndex++)
- {
- if (equal(g_szDefaultSounds[iIndex], szSound))
- {
- emit_sound(id, iChannel, g_szKnife8Sounds[iIndex], 1.0, ATTN_NORM, 0, PITCH_NORM)
- return FMRES_SUPERCEDE
- }
- }
- }
- return FMRES_IGNORED
- }
Knife Menu With Lvl
Knife Menu With Lvl
Any one can make this knife level in menu not auto ??
DRK Zombie-Escape V1.6
IP : 81.169.153.129:27015
IP : 81.169.153.129:27015
- #include <zombie_escape>
- #include <ze_levels>
- // Models
- new const g_szKnife1[][] =
- {
- "models/dg/v_knife_griff.mdl",
- "models/dg/p_knife_griff1.mdl"
- }
- new const g_szKnife2[][] =
- {
- "models/dg/v_flip_t.mdl",
- "models/dg/p_flip_t.mdl"
- }
- new const g_szKnife3[][] =
- {
- "models/dg/v_butterfly_knife.mdl",
- "models/dg/p_butterfly_knife.mdl"
- }
- new const g_szKnife4[][] =
- {
- "models/dg/v_bayonet.mdl",
- "models/dg/p_bayonet.mdl"
- }
- new const g_szKnife5[][] =
- {
- "models/dg/v_knife_karambit.mdl",
- "models/dg/p_knife_karambit.mdl"
- }
- new const g_szKnife6[][] =
- {
- "models/dg/v_knife_karambit.mdl",
- "models/dg/p_knife_karambit.mdl"
- }
- new const g_szKnife7[][] =
- {
- "models/dg/v_knifew.mdl",
- "models/dg/p_knifew.mdl"
- }
- new const g_szKnife8[][] =
- {
- "models/dg/v_knifew.mdl",
- "models/dg/p_knifew.mdl"
- }
- // Sounds
- new const g_szKnife1Sounds[][] =
- {
- "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 const g_szKnife2Sounds[][] =
- {
- "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 const g_szKnife3Sounds[][] =
- {
- "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 const g_szKnife4Sounds[][] =
- {
- "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 const g_szKnife5Sounds[][] =
- {
- "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 const g_szKnife6Sounds[][] =
- {
- "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 const g_szKnife7Sounds[][] =
- {
- "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 const g_szKnife8Sounds[][] =
- {
- "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 const g_szDefaultSounds[][] =
- {
- "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"
- }
- // Models indexes
- enum
- {
- V_Model = 0,
- P_Model
- }
- public plugin_init()
- {
- register_plugin("Knife Levels", "1.0", "lux")
- // Fakemeta
- register_forward(FM_EmitSound, "Fw_EmitSound")
- // Commands
- register_clcmd("say /knife", "KnifeCommandHandler")
- }
- public plugin_precache()
- {
- new iIndex;
- // Prechace models
- for(iIndex = 0; iIndex <= charsmax(g_szKnife1); iIndex++)
- precache_model(g_szKnife1[iIndex])
- for(iIndex = 0; iIndex <= charsmax(g_szKnife2); iIndex++)
- precache_model(g_szKnife2[iIndex])
- for(iIndex = 0; iIndex <= charsmax(g_szKnife3); iIndex++)
- precache_model(g_szKnife3[iIndex])
- for(iIndex = 0; iIndex <= charsmax(g_szKnife4); iIndex++)
- precache_model(g_szKnife4[iIndex])
- for(iIndex = 0; iIndex <= charsmax(g_szKnife5); iIndex++)
- precache_model(g_szKnife5[iIndex])
- for(iIndex = 0; iIndex <= charsmax(g_szKnife6); iIndex++)
- precache_model(g_szKnife6[iIndex])
- for(iIndex = 0; iIndex <= charsmax(g_szKnife7); iIndex++)
- precache_model(g_szKnife7[iIndex])
- for(iIndex = 0; iIndex <= charsmax(g_szKnife8); iIndex++)
- precache_model(g_szKnife8[iIndex])
- // Prechace sounds
- for(iIndex = 0; iIndex <= charsmax(g_szKnife1Sounds); iIndex++)
- precache_sound(g_szKnife1Sounds[iIndex])
- for(iIndex = 0; iIndex <= charsmax(g_szKnife1Sounds); iIndex++)
- precache_sound(g_szKnife1Sounds[iIndex])
- }
- public KnifeCommandHandler(id)
- {
- new iMenu = menu_create("Knives Menu:", "KnifeMenuHandler")
- menu_additem(iMenu, "\rKnife 1", "", 0)
- menu_additem(iMenu, "\rKnife 2", "", 0)
- menu_additem(iMenu, "\rKnife 3", "", 0)
- menu_additem(iMenu, "\rKnife 4", "", 0)
- menu_additem(iMenu, "\rKnife 5", "", 0)
- menu_additem(iMenu, "\rKnife 6", "", 0)
- menu_additem(iMenu, "\rKnife 7", "", 0)
- menu_setprop(iMenu, MPROP_EXIT, MEXIT_ALL)
- menu_display(id, iMenu, 0)
- // No more replies needed from the server...
- return PLUGIN_HANDLED
- }
- public KnifeMenuHandler(id, iMenu, iItem)
- {
- switch (iMenu)
- {
- case 0:
- {
- if (ze_get_user_level(id) >= 0 && ze_get_user_level(id) < 4)
- {
- // Player level from 1 to 5 set him this knife
- cs_set_player_view_model(id, CSW_KNIFE, g_szKnife1[V_Model])
- cs_set_player_weap_model(id, CSW_KNIFE, g_szKnife1[P_Model])
- ResetKnife(id)
- }
- }
- case 1:
- {
- if (ze_get_user_level(id) >= 5 && ze_get_user_level(id) < 9)
- {
- // Player level from 5 to 8 set him this knife
- cs_set_player_view_model(id, CSW_KNIFE, g_szKnife2[V_Model])
- cs_set_player_weap_model(id, CSW_KNIFE, g_szKnife2[P_Model])
- ResetKnife(id)
- }
- }
- case 2:
- {
- if (ze_get_user_level(id) >= 10 && ze_get_user_level(id) < 14)
- {
- // Player level from 5 to 8 set him this knife
- cs_set_player_view_model(id, CSW_KNIFE, g_szKnife3[V_Model])
- cs_set_player_weap_model(id, CSW_KNIFE, g_szKnife3[P_Model])
- ResetKnife(id)
- }
- }
- case 3:
- {
- if (ze_get_user_level(id) >= 15 && ze_get_user_level(id) < 19)
- {
- // Player level from 5 to 8 set him this knife
- cs_set_player_view_model(id, CSW_KNIFE, g_szKnife4[V_Model])
- cs_set_player_weap_model(id, CSW_KNIFE, g_szKnife4[P_Model])
- ResetKnife(id)
- }
- }
- case 4:
- {
- if (ze_get_user_level(id) >= 20 && ze_get_user_level(id) < 24)
- {
- // Player level from 26 to 30 set him this knife
- cs_set_player_view_model(id, CSW_KNIFE, g_szKnife5[V_Model])
- cs_set_player_weap_model(id, CSW_KNIFE, g_szKnife5[P_Model])
- ResetKnife(id)
- }
- }
- case 5:
- {
- if (ze_get_user_level(id) >= 25 && ze_get_user_level(id) < 29)
- {
- // Player level from 26 to 30 set him this knife
- cs_set_player_view_model(id, CSW_KNIFE, g_szKnife6[V_Model])
- cs_set_player_weap_model(id, CSW_KNIFE, g_szKnife6[P_Model])
- ResetKnife(id)
- }
- }
- case 6:
- {
- if (ze_get_user_level(id) >= 30 && ze_get_user_level(id) < 50)
- {
- // Player level from 26 to 30 set him this knife
- cs_set_player_view_model(id, CSW_KNIFE, g_szKnife7[V_Model])
- cs_set_player_weap_model(id, CSW_KNIFE, g_szKnife7[P_Model])
- ResetKnife(id)
- }
- }
- }
- return PLUGIN_HANDLED
- }
- public ResetKnife(id)
- {
- rg_remove_item(id, "weapon_knife")
- rg_give_item(id, "weapon_knife", GT_APPEND)
- engclient_cmd(id, "weapon_knife")
- emit_sound(id, CHAN_BODY, "items/gunpickup2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- }
- public Fw_EmitSound(id, iChannel, const szSound[])
- {
- if(!is_user_alive(id) || ze_is_user_zombie(id))
- return FMRES_IGNORED
- if (ze_get_user_level(id) >= 0 && ze_get_user_level(id) < 0)
- {
- for(new iIndex = 0; iIndex <= charsmax(g_szDefaultSounds); iIndex++)
- {
- if (equal(g_szDefaultSounds[iIndex], szSound))
- {
- emit_sound(id, iChannel, g_szKnife1Sounds[iIndex], 1.0, ATTN_NORM, 0, PITCH_NORM)
- return FMRES_SUPERCEDE
- }
- }
- }
- else if (ze_get_user_level(id) >= 0 && ze_get_user_level(id) < 5)
- {
- for(new iIndex = 0; iIndex <= charsmax(g_szDefaultSounds); iIndex++)
- {
- if (equal(g_szDefaultSounds[iIndex], szSound))
- {
- emit_sound(id, iChannel, g_szKnife2Sounds[iIndex], 1.0, ATTN_NORM, 0, PITCH_NORM)
- return FMRES_SUPERCEDE
- }
- }
- }
- else if (ze_get_user_level(id) >= 5 && ze_get_user_level(id) < 9)
- {
- for(new iIndex = 0; iIndex <= charsmax(g_szDefaultSounds); iIndex++)
- {
- if (equal(g_szDefaultSounds[iIndex], szSound))
- {
- emit_sound(id, iChannel, g_szKnife3Sounds[iIndex], 1.0, ATTN_NORM, 0, PITCH_NORM)
- return FMRES_SUPERCEDE
- }
- }
- }
- else if (ze_get_user_level(id) >= 10 && ze_get_user_level(id) < 14)
- {
- for(new iIndex = 0; iIndex <= charsmax(g_szDefaultSounds); iIndex++)
- {
- if (equal(g_szDefaultSounds[iIndex], szSound))
- {
- emit_sound(id, iChannel, g_szKnife4Sounds[iIndex], 1.0, ATTN_NORM, 0, PITCH_NORM)
- return FMRES_SUPERCEDE
- }
- }
- }
- else if (ze_get_user_level(id) >= 15 && ze_get_user_level(id) < 20)
- {
- for(new iIndex = 0; iIndex <= charsmax(g_szDefaultSounds); iIndex++)
- {
- if (equal(g_szDefaultSounds[iIndex], szSound))
- {
- emit_sound(id, iChannel, g_szKnife5Sounds[iIndex], 1.0, ATTN_NORM, 0, PITCH_NORM)
- return FMRES_SUPERCEDE
- }
- }
- }
- else if (ze_get_user_level(id) >= 21 && ze_get_user_level(id) < 30)
- {
- for(new iIndex = 0; iIndex <= charsmax(g_szDefaultSounds); iIndex++)
- {
- if (equal(g_szDefaultSounds[iIndex], szSound))
- {
- emit_sound(id, iChannel, g_szKnife6Sounds[iIndex], 1.0, ATTN_NORM, 0, PITCH_NORM)
- return FMRES_SUPERCEDE
- }
- }
- }
- else if (ze_get_user_level(id) >= 31 && ze_get_user_level(id) < 40)
- {
- for(new iIndex = 0; iIndex <= charsmax(g_szDefaultSounds); iIndex++)
- {
- if (equal(g_szDefaultSounds[iIndex], szSound))
- {
- emit_sound(id, iChannel, g_szKnife7Sounds[iIndex], 1.0, ATTN_NORM, 0, PITCH_NORM)
- return FMRES_SUPERCEDE
- }
- }
- }
- else if (ze_get_user_level(id) >= 49 && ze_get_user_level(id) < 50)
- {
- for(new iIndex = 0; iIndex <= charsmax(g_szDefaultSounds); iIndex++)
- {
- if (equal(g_szDefaultSounds[iIndex], szSound))
- {
- emit_sound(id, iChannel, g_szKnife8Sounds[iIndex], 1.0, ATTN_NORM, 0, PITCH_NORM)
- return FMRES_SUPERCEDE
- }
- }
- }
- return FMRES_IGNORED
- }
He who fails to plan is planning to fail
i mean to add knife [VIP] in menu
and the menu is working but when i choose some knife from menu i don`t get the knife
and the menu is working but when i choose some knife from menu i don`t get the knife
DRK Zombie-Escape V1.6
IP : 81.169.153.129:27015
IP : 81.169.153.129:27015
Still not understand what you mean VIP knife.
If your level between some of these you should get the knife.
If your level between some of these you should get the knife.
He who fails to plan is planning to fail
i gave my self level 50 and i tried to choose the knifes but it not work
i mean 1 knife with access
i mean 1 knife with access
DRK Zombie-Escape V1.6
IP : 81.169.153.129:27015
IP : 81.169.153.129:27015
Problem in the main code itself:
Also edit:
- #include <zombie_escape>
- #include <ze_levels>
- // Models
- new const g_szKnife1[][] =
- {
- "models/dg/v_knife_griff.mdl",
- "models/dg/p_knife_griff1.mdl"
- }
- new const g_szKnife2[][] =
- {
- "models/dg/v_flip_t.mdl",
- "models/dg/p_flip_t.mdl"
- }
- new const g_szKnife3[][] =
- {
- "models/dg/v_butterfly_knife.mdl",
- "models/dg/p_butterfly_knife.mdl"
- }
- new const g_szKnife4[][] =
- {
- "models/dg/v_bayonet.mdl",
- "models/dg/p_bayonet.mdl"
- }
- new const g_szKnife5[][] =
- {
- "models/dg/v_knife_karambit.mdl",
- "models/dg/p_knife_karambit.mdl"
- }
- new const g_szKnife6[][] =
- {
- "models/dg/v_knife_karambit.mdl",
- "models/dg/p_knife_karambit.mdl"
- }
- new const g_szKnife7[][] =
- {
- "models/dg/v_knifew.mdl",
- "models/dg/p_knifew.mdl"
- }
- new const g_szKnife8[][] =
- {
- "models/dg/v_knifew.mdl",
- "models/dg/p_knifew.mdl"
- }
- // Sounds
- new const g_szKnife1Sounds[][] =
- {
- "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 const g_szKnife2Sounds[][] =
- {
- "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 const g_szKnife3Sounds[][] =
- {
- "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 const g_szKnife4Sounds[][] =
- {
- "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 const g_szKnife5Sounds[][] =
- {
- "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 const g_szKnife6Sounds[][] =
- {
- "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 const g_szKnife7Sounds[][] =
- {
- "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 const g_szKnife8Sounds[][] =
- {
- "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 const g_szDefaultSounds[][] =
- {
- "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"
- }
- // Models indexes
- enum
- {
- V_Model = 0,
- P_Model
- }
- public plugin_init()
- {
- register_plugin("Knife Levels", "1.0", "lux")
- // Fakemeta
- register_forward(FM_EmitSound, "Fw_EmitSound")
- // Commands
- register_clcmd("say /knife", "KnifeCommandHandler")
- }
- public plugin_precache()
- {
- new iIndex;
- // Prechace models
- for(iIndex = 0; iIndex <= charsmax(g_szKnife1); iIndex++)
- precache_model(g_szKnife1[iIndex])
- for(iIndex = 0; iIndex <= charsmax(g_szKnife2); iIndex++)
- precache_model(g_szKnife2[iIndex])
- for(iIndex = 0; iIndex <= charsmax(g_szKnife3); iIndex++)
- precache_model(g_szKnife3[iIndex])
- for(iIndex = 0; iIndex <= charsmax(g_szKnife4); iIndex++)
- precache_model(g_szKnife4[iIndex])
- for(iIndex = 0; iIndex <= charsmax(g_szKnife5); iIndex++)
- precache_model(g_szKnife5[iIndex])
- for(iIndex = 0; iIndex <= charsmax(g_szKnife6); iIndex++)
- precache_model(g_szKnife6[iIndex])
- for(iIndex = 0; iIndex <= charsmax(g_szKnife7); iIndex++)
- precache_model(g_szKnife7[iIndex])
- for(iIndex = 0; iIndex <= charsmax(g_szKnife8); iIndex++)
- precache_model(g_szKnife8[iIndex])
- // Prechace sounds
- for(iIndex = 0; iIndex <= charsmax(g_szKnife1Sounds); iIndex++)
- precache_sound(g_szKnife1Sounds[iIndex])
- for(iIndex = 0; iIndex <= charsmax(g_szKnife1Sounds); iIndex++)
- precache_sound(g_szKnife1Sounds[iIndex])
- }
- public KnifeCommandHandler(id)
- {
- new iMenu = menu_create("Knives Menu:", "KnifeMenuHandler")
- menu_additem(iMenu, "\rKnife 1", "", 0)
- menu_additem(iMenu, "\rKnife 2", "", 0)
- menu_additem(iMenu, "\rKnife 3", "", 0)
- menu_additem(iMenu, "\rKnife 4", "", 0)
- menu_additem(iMenu, "\rKnife 5", "", 0)
- menu_additem(iMenu, "\rKnife 6", "", 0)
- menu_additem(iMenu, "\rKnife 7", "", 0)
- menu_setprop(iMenu, MPROP_EXIT, MEXIT_ALL)
- menu_display(id, iMenu, 0)
- // No more replies needed from the server...
- return PLUGIN_HANDLED
- }
- public KnifeMenuHandler(id, iMenu, iItem)
- {
- switch (iMenu)
- {
- case 0:
- {
- if (ze_get_user_level(id) >= 4)
- {
- // Player level from 1 to 5 set him this knife
- cs_set_player_view_model(id, CSW_KNIFE, g_szKnife1[V_Model])
- cs_set_player_weap_model(id, CSW_KNIFE, g_szKnife1[P_Model])
- ResetKnife(id)
- }
- }
- case 1:
- {
- if (ze_get_user_level(id) >= 9)
- {
- // Player level from 5 to 8 set him this knife
- cs_set_player_view_model(id, CSW_KNIFE, g_szKnife2[V_Model])
- cs_set_player_weap_model(id, CSW_KNIFE, g_szKnife2[P_Model])
- ResetKnife(id)
- }
- }
- case 2:
- {
- if (ze_get_user_level(id) >= 14)
- {
- // Player level from 5 to 8 set him this knife
- cs_set_player_view_model(id, CSW_KNIFE, g_szKnife3[V_Model])
- cs_set_player_weap_model(id, CSW_KNIFE, g_szKnife3[P_Model])
- ResetKnife(id)
- }
- }
- case 3:
- {
- if (ze_get_user_level(id) >= 19)
- {
- // Player level from 5 to 8 set him this knife
- cs_set_player_view_model(id, CSW_KNIFE, g_szKnife4[V_Model])
- cs_set_player_weap_model(id, CSW_KNIFE, g_szKnife4[P_Model])
- ResetKnife(id)
- }
- }
- case 4:
- {
- if (ze_get_user_level(id) >= 24)
- {
- // Player level from 26 to 30 set him this knife
- cs_set_player_view_model(id, CSW_KNIFE, g_szKnife5[V_Model])
- cs_set_player_weap_model(id, CSW_KNIFE, g_szKnife5[P_Model])
- ResetKnife(id)
- }
- }
- case 5:
- {
- if (ze_get_user_level(id) >= 29)
- {
- // Player level from 26 to 30 set him this knife
- cs_set_player_view_model(id, CSW_KNIFE, g_szKnife6[V_Model])
- cs_set_player_weap_model(id, CSW_KNIFE, g_szKnife6[P_Model])
- ResetKnife(id)
- }
- }
- case 6:
- {
- if (ze_get_user_level(id) >= 50)
- {
- // Player level from 26 to 30 set him this knife
- cs_set_player_view_model(id, CSW_KNIFE, g_szKnife7[V_Model])
- cs_set_player_weap_model(id, CSW_KNIFE, g_szKnife7[P_Model])
- ResetKnife(id)
- }
- }
- }
- return PLUGIN_HANDLED
- }
- public ResetKnife(id)
- {
- rg_remove_item(id, "weapon_knife")
- rg_give_item(id, "weapon_knife", GT_APPEND)
- engclient_cmd(id, "weapon_knife")
- emit_sound(id, CHAN_BODY, "items/gunpickup2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- }
- public Fw_EmitSound(id, iChannel, const szSound[])
- {
- if(!is_user_alive(id) || ze_is_user_zombie(id))
- return FMRES_IGNORED
- if (ze_get_user_level(id) >= 0 && ze_get_user_level(id) < 0)
- {
- for(new iIndex = 0; iIndex <= charsmax(g_szDefaultSounds); iIndex++)
- {
- if (equal(g_szDefaultSounds[iIndex], szSound))
- {
- emit_sound(id, iChannel, g_szKnife1Sounds[iIndex], 1.0, ATTN_NORM, 0, PITCH_NORM)
- return FMRES_SUPERCEDE
- }
- }
- }
- else if (ze_get_user_level(id) >= 0 && ze_get_user_level(id) < 5)
- {
- for(new iIndex = 0; iIndex <= charsmax(g_szDefaultSounds); iIndex++)
- {
- if (equal(g_szDefaultSounds[iIndex], szSound))
- {
- emit_sound(id, iChannel, g_szKnife2Sounds[iIndex], 1.0, ATTN_NORM, 0, PITCH_NORM)
- return FMRES_SUPERCEDE
- }
- }
- }
- else if (ze_get_user_level(id) >= 5 && ze_get_user_level(id) < 9)
- {
- for(new iIndex = 0; iIndex <= charsmax(g_szDefaultSounds); iIndex++)
- {
- if (equal(g_szDefaultSounds[iIndex], szSound))
- {
- emit_sound(id, iChannel, g_szKnife3Sounds[iIndex], 1.0, ATTN_NORM, 0, PITCH_NORM)
- return FMRES_SUPERCEDE
- }
- }
- }
- else if (ze_get_user_level(id) >= 10 && ze_get_user_level(id) < 14)
- {
- for(new iIndex = 0; iIndex <= charsmax(g_szDefaultSounds); iIndex++)
- {
- if (equal(g_szDefaultSounds[iIndex], szSound))
- {
- emit_sound(id, iChannel, g_szKnife4Sounds[iIndex], 1.0, ATTN_NORM, 0, PITCH_NORM)
- return FMRES_SUPERCEDE
- }
- }
- }
- else if (ze_get_user_level(id) >= 15 && ze_get_user_level(id) < 20)
- {
- for(new iIndex = 0; iIndex <= charsmax(g_szDefaultSounds); iIndex++)
- {
- if (equal(g_szDefaultSounds[iIndex], szSound))
- {
- emit_sound(id, iChannel, g_szKnife5Sounds[iIndex], 1.0, ATTN_NORM, 0, PITCH_NORM)
- return FMRES_SUPERCEDE
- }
- }
- }
- else if (ze_get_user_level(id) >= 21 && ze_get_user_level(id) < 30)
- {
- for(new iIndex = 0; iIndex <= charsmax(g_szDefaultSounds); iIndex++)
- {
- if (equal(g_szDefaultSounds[iIndex], szSound))
- {
- emit_sound(id, iChannel, g_szKnife6Sounds[iIndex], 1.0, ATTN_NORM, 0, PITCH_NORM)
- return FMRES_SUPERCEDE
- }
- }
- }
- else if (ze_get_user_level(id) >= 31 && ze_get_user_level(id) < 40)
- {
- for(new iIndex = 0; iIndex <= charsmax(g_szDefaultSounds); iIndex++)
- {
- if (equal(g_szDefaultSounds[iIndex], szSound))
- {
- emit_sound(id, iChannel, g_szKnife7Sounds[iIndex], 1.0, ATTN_NORM, 0, PITCH_NORM)
- return FMRES_SUPERCEDE
- }
- }
- }
- else if (ze_get_user_level(id) >= 49 && ze_get_user_level(id) < 50)
- {
- for(new iIndex = 0; iIndex <= charsmax(g_szDefaultSounds); iIndex++)
- {
- if (equal(g_szDefaultSounds[iIndex], szSound))
- {
- emit_sound(id, iChannel, g_szKnife8Sounds[iIndex], 1.0, ATTN_NORM, 0, PITCH_NORM)
- return FMRES_SUPERCEDE
- }
- }
- }
- return FMRES_IGNORED
- }
Also edit:
- public Fw_EmitSound(id, iChannel, const szSound[])
- public KnifeMenuHandler(id, iMenu, iItem)
He who fails to plan is planning to fail
@Raheem
I got error
I got error
- //// knife.sma
- //
- // C:\Users\Administrator\Desktop\ZE[Windows]\Compailor V 1.6\knife.sma(334) : error 021: symbol already defined: "KnifeMenuHandler"
- // C:\Users\Administrator\Desktop\ZE[Windows]\Compailor V 1.6\knife.sma(342) : error 017: undefined symbol "szSound"
- // C:\Users\Administrator\Desktop\ZE[Windows]\Compailor V 1.6\knife.sma(344) : error 017: undefined symbol "iChannel"
- // C:\Users\Administrator\Desktop\ZE[Windows]\Compailor V 1.6\knife.sma(344) : warning 215: expression has no effect
- // C:\Users\Administrator\Desktop\ZE[Windows]\Compailor V 1.6\knife.sma(344) : warning 215: expression has no effect
- // C:\Users\Administrator\Desktop\ZE[Windows]\Compailor V 1.6\knife.sma(344) : warning 215: expression has no effect
- // C:\Users\Administrator\Desktop\ZE[Windows]\Compailor V 1.6\knife.sma(344) : warning 215: expression has no effect
- // C:\Users\Administrator\Desktop\ZE[Windows]\Compailor V 1.6\knife.sma(344) : warning 215: expression has no effect
- // C:\Users\Administrator\Desktop\ZE[Windows]\Compailor V 1.6\knife.sma(344) : error 001: expected token: ";", but found ")"
- // C:\Users\Administrator\Desktop\ZE[Windows]\Compailor V 1.6\knife.sma(344) : error 029: invalid expression, assumed zero
- // C:\Users\Administrator\Desktop\ZE[Windows]\Compailor V 1.6\knife.sma(344) : fatal error 107: too many error messages on one line
- //
- // Compilation aborted.
- // 6 Errors.
- // Could not locate output file C:\Users\Administrator\Desktop\ZE[Windows]\Compailor V 1.6\compiled\knife.amx (compile failed).
- //
- // Compilation Time: 4.94 sec
- // ----------------------------------------
DRK Zombie-Escape V1.6
IP : 81.169.153.129:27015
IP : 81.169.153.129:27015
- #include <zombie_escape>
- #include <ze_levels>
- // Models
- new const g_szKnife1[][] =
- {
- "models/dg/v_knife_griff.mdl",
- "models/dg/p_knife_griff1.mdl"
- }
- new const g_szKnife2[][] =
- {
- "models/dg/v_flip_t.mdl",
- "models/dg/p_flip_t.mdl"
- }
- new const g_szKnife3[][] =
- {
- "models/dg/v_butterfly_knife.mdl",
- "models/dg/p_butterfly_knife.mdl"
- }
- new const g_szKnife4[][] =
- {
- "models/dg/v_bayonet.mdl",
- "models/dg/p_bayonet.mdl"
- }
- new const g_szKnife5[][] =
- {
- "models/dg/v_knife_karambit.mdl",
- "models/dg/p_knife_karambit.mdl"
- }
- new const g_szKnife6[][] =
- {
- "models/dg/v_knife_karambit.mdl",
- "models/dg/p_knife_karambit.mdl"
- }
- new const g_szKnife7[][] =
- {
- "models/dg/v_knifew.mdl",
- "models/dg/p_knifew.mdl"
- }
- new const g_szKnife8[][] =
- {
- "models/dg/v_knifew.mdl",
- "models/dg/p_knifew.mdl"
- }
- // Sounds
- new const g_szKnife1Sounds[][] =
- {
- "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 const g_szKnife2Sounds[][] =
- {
- "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 const g_szKnife3Sounds[][] =
- {
- "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 const g_szKnife4Sounds[][] =
- {
- "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 const g_szKnife5Sounds[][] =
- {
- "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 const g_szKnife6Sounds[][] =
- {
- "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 const g_szKnife7Sounds[][] =
- {
- "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 const g_szKnife8Sounds[][] =
- {
- "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 const g_szDefaultSounds[][] =
- {
- "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"
- }
- // Models indexes
- enum
- {
- V_Model = 0,
- P_Model
- }
- public plugin_init()
- {
- register_plugin("Knife Levels", "1.0", "lux")
- // Fakemeta
- register_forward(Fw_KnifeMenuHandler, "Fw_KnifeMenuHandler")
- // Commands
- register_clcmd("say /knife", "KnifeCommandHandler")
- }
- public plugin_precache()
- {
- new iIndex;
- // Prechace models
- for(iIndex = 0; iIndex <= charsmax(g_szKnife1); iIndex++)
- precache_model(g_szKnife1[iIndex])
- for(iIndex = 0; iIndex <= charsmax(g_szKnife2); iIndex++)
- precache_model(g_szKnife2[iIndex])
- for(iIndex = 0; iIndex <= charsmax(g_szKnife3); iIndex++)
- precache_model(g_szKnife3[iIndex])
- for(iIndex = 0; iIndex <= charsmax(g_szKnife4); iIndex++)
- precache_model(g_szKnife4[iIndex])
- for(iIndex = 0; iIndex <= charsmax(g_szKnife5); iIndex++)
- precache_model(g_szKnife5[iIndex])
- for(iIndex = 0; iIndex <= charsmax(g_szKnife6); iIndex++)
- precache_model(g_szKnife6[iIndex])
- for(iIndex = 0; iIndex <= charsmax(g_szKnife7); iIndex++)
- precache_model(g_szKnife7[iIndex])
- for(iIndex = 0; iIndex <= charsmax(g_szKnife8); iIndex++)
- precache_model(g_szKnife8[iIndex])
- // Prechace sounds
- for(iIndex = 0; iIndex <= charsmax(g_szKnife1Sounds); iIndex++)
- precache_sound(g_szKnife1Sounds[iIndex])
- for(iIndex = 0; iIndex <= charsmax(g_szKnife1Sounds); iIndex++)
- precache_sound(g_szKnife1Sounds[iIndex])
- }
- public KnifeCommandHandler(id)
- {
- new iMenu = menu_create("Knives Menu:", "KnifeMenuHandler")
- menu_additem(iMenu, "\rKnife 1", "", 0)
- menu_additem(iMenu, "\rKnife 2", "", 0)
- menu_additem(iMenu, "\rKnife 3", "", 0)
- menu_additem(iMenu, "\rKnife 4", "", 0)
- menu_additem(iMenu, "\rKnife 5", "", 0)
- menu_additem(iMenu, "\rKnife 6", "", 0)
- menu_additem(iMenu, "\rKnife 7", "", 0)
- menu_setprop(iMenu, MPROP_EXIT, MEXIT_ALL)
- menu_display(id, iMenu, 0)
- // No more replies needed from the server...
- return PLUGIN_HANDLED
- }
- public KnifeMenuHandler(id, iMenu, iItem)
- {
- switch (iMenu)
- {
- case 0:
- {
- if (ze_get_user_level(id) >= 4)
- {
- // Player level from 1 to 5 set him this knife
- cs_set_player_view_model(id, CSW_KNIFE, g_szKnife1[V_Model])
- cs_set_player_weap_model(id, CSW_KNIFE, g_szKnife1[P_Model])
- ResetKnife(id)
- }
- }
- case 1:
- {
- if (ze_get_user_level(id) >= 9)
- {
- // Player level from 5 to 8 set him this knife
- cs_set_player_view_model(id, CSW_KNIFE, g_szKnife2[V_Model])
- cs_set_player_weap_model(id, CSW_KNIFE, g_szKnife2[P_Model])
- ResetKnife(id)
- }
- }
- case 2:
- {
- if (ze_get_user_level(id) >= 14)
- {
- // Player level from 5 to 8 set him this knife
- cs_set_player_view_model(id, CSW_KNIFE, g_szKnife3[V_Model])
- cs_set_player_weap_model(id, CSW_KNIFE, g_szKnife3[P_Model])
- ResetKnife(id)
- }
- }
- case 3:
- {
- if (ze_get_user_level(id) >= 19)
- {
- // Player level from 5 to 8 set him this knife
- cs_set_player_view_model(id, CSW_KNIFE, g_szKnife4[V_Model])
- cs_set_player_weap_model(id, CSW_KNIFE, g_szKnife4[P_Model])
- ResetKnife(id)
- }
- }
- case 4:
- {
- if (ze_get_user_level(id) >= 24)
- {
- // Player level from 26 to 30 set him this knife
- cs_set_player_view_model(id, CSW_KNIFE, g_szKnife5[V_Model])
- cs_set_player_weap_model(id, CSW_KNIFE, g_szKnife5[P_Model])
- ResetKnife(id)
- }
- }
- case 5:
- {
- if (ze_get_user_level(id) >= 29)
- {
- // Player level from 26 to 30 set him this knife
- cs_set_player_view_model(id, CSW_KNIFE, g_szKnife6[V_Model])
- cs_set_player_weap_model(id, CSW_KNIFE, g_szKnife6[P_Model])
- ResetKnife(id)
- }
- }
- case 6:
- {
- if (ze_get_user_level(id) >= 50)
- {
- // Player level from 26 to 30 set him this knife
- cs_set_player_view_model(id, CSW_KNIFE, g_szKnife7[V_Model])
- cs_set_player_weap_model(id, CSW_KNIFE, g_szKnife7[P_Model])
- ResetKnife(id)
- }
- }
- }
- return PLUGIN_HANDLED
- }
- public ResetKnife(id)
- {
- rg_remove_item(id, "weapon_knife")
- rg_give_item(id, "weapon_knife", GT_APPEND)
- engclient_cmd(id, "weapon_knife")
- KnifeMenuHandler(id, CHAN_BODY, "items/gunpickup2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- }
- public KnifeMenuHandler(id, iMenu, iItem)
- {
- if(!is_user_alive(id) || ze_is_user_zombie(id))
- return FMRES_IGNORED
- if (ze_get_user_level(id) >= 0 && ze_get_user_level(id) < 0)
- {
- for(new iIndex = 0; iIndex <= charsmax(g_szDefaultSounds); iIndex++)
- {
- if (equal(g_szDefaultSounds[iIndex], szSound))
- {
- KnifeMenuHandler(id, iMenu, g_szKnife1Sounds[iIndex], 1.0, ATTN_NORM, 0, PITCH_NORM)
- return FMRES_SUPERCEDE
- }
- }
- }
- else if (ze_get_user_level(id) >= 0 && ze_get_user_level(id) < 5)
- {
- for(new iIndex = 0; iIndex <= charsmax(g_szDefaultSounds); iIndex++)
- {
- if (equal(g_szDefaultSounds[iIndex], szSound))
- {
- KnifeMenuHandler(id, iMenu, g_szKnife2Sounds[iIndex], 1.0, ATTN_NORM, 0, PITCH_NORM)
- return FMRES_SUPERCEDE
- }
- }
- }
- else if (ze_get_user_level(id) >= 5 && ze_get_user_level(id) < 9)
- {
- for(new iIndex = 0; iIndex <= charsmax(g_szDefaultSounds); iIndex++)
- {
- if (equal(g_szDefaultSounds[iIndex], szSound))
- {
- KnifeMenuHandler(id, iMenu, g_szKnife3Sounds[iIndex], 1.0, ATTN_NORM, 0, PITCH_NORM)
- return FMRES_SUPERCEDE
- }
- }
- }
- else if (ze_get_user_level(id) >= 10 && ze_get_user_level(id) < 14)
- {
- for(new iIndex = 0; iIndex <= charsmax(g_szDefaultSounds); iIndex++)
- {
- if (equal(g_szDefaultSounds[iIndex], szSound))
- {
- KnifeMenuHandler(id, iMenu, g_szKnife4Sounds[iIndex], 1.0, ATTN_NORM, 0, PITCH_NORM)
- return FMRES_SUPERCEDE
- }
- }
- }
- else if (ze_get_user_level(id) >= 15 && ze_get_user_level(id) < 20)
- {
- for(new iIndex = 0; iIndex <= charsmax(g_szDefaultSounds); iIndex++)
- {
- if (equal(g_szDefaultSounds[iIndex], szSound))
- {
- KnifeMenuHandler(id, iMenu, g_szKnife5Sounds[iIndex], 1.0, ATTN_NORM, 0, PITCH_NORM)
- return FMRES_SUPERCEDE
- }
- }
- }
- else if (ze_get_user_level(id) >= 21 && ze_get_user_level(id) < 30)
- {
- for(new iIndex = 0; iIndex <= charsmax(g_szDefaultSounds); iIndex++)
- {
- if (equal(g_szDefaultSounds[iIndex], szSound))
- {
- KnifeMenuHandler(id, iMenu, g_szKnife6Sounds[iIndex], 1.0, ATTN_NORM, 0, PITCH_NORM)
- return FMRES_SUPERCEDE
- }
- }
- }
- else if (ze_get_user_level(id) >= 31 && ze_get_user_level(id) < 40)
- {
- for(new iIndex = 0; iIndex <= charsmax(g_szDefaultSounds); iIndex++)
- {
- if (equal(g_szDefaultSounds[iIndex], szSound))
- {
- KnifeMenuHandler(id, iMenu, g_szKnife7Sounds[iIndex], 1.0, ATTN_NORM, 0, PITCH_NORM)
- return FMRES_SUPERCEDE
- }
- }
- }
- else if (ze_get_user_level(id) >= 49 && ze_get_user_level(id) < 50)
- {
- for(new iIndex = 0; iIndex <= charsmax(g_szDefaultSounds); iIndex++)
- {
- if (equal(g_szDefaultSounds[iIndex], szSound))
- {
- KnifeMenuHandler(id, iMenu, g_szKnife8Sounds[iIndex], 1.0, ATTN_NORM, 0, PITCH_NORM)
- return FMRES_SUPERCEDE
- }
- }
- }
- return FMRES_IGNORED
- }
DRK Zombie-Escape V1.6
IP : 81.169.153.129:27015
IP : 81.169.153.129:27015
- Evillious Energy
- Member
- Posts: 22
- Joined: 4 years ago
- Contact:
Luxurious wrote: ↑3 years ago
#include <zombie_escape> #include <ze_levels> // Models new const g_szKnife1[][] = { "models/dg/v_knife_griff.mdl", "models/dg/p_knife_griff1.mdl" } new const g_szKnife2[][] = { "models/dg/v_flip_t.mdl", "models/dg/p_flip_t.mdl" } new const g_szKnife3[][] = { "models/dg/v_butterfly_knife.mdl", "models/dg/p_butterfly_knife.mdl" } new const g_szKnife4[][] = { "models/dg/v_bayonet.mdl", "models/dg/p_bayonet.mdl" } new const g_szKnife5[][] = { "models/dg/v_knife_karambit.mdl", "models/dg/p_knife_karambit.mdl" } new const g_szKnife6[][] = { "models/dg/v_knife_karambit.mdl", "models/dg/p_knife_karambit.mdl" } new const g_szKnife7[][] = { "models/dg/v_knifew.mdl", "models/dg/p_knifew.mdl" } new const g_szKnife8[][] = { "models/dg/v_knifew.mdl", "models/dg/p_knifew.mdl" } // Sounds new const g_szKnife1Sounds[][] = { "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 const g_szKnife2Sounds[][] = { "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 const g_szKnife3Sounds[][] = { "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 const g_szKnife4Sounds[][] = { "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 const g_szKnife5Sounds[][] = { "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 const g_szKnife6Sounds[][] = { "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 const g_szKnife7Sounds[][] = { "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 const g_szKnife8Sounds[][] = { "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 const g_szDefaultSounds[][] = { "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" } // Models indexes enum { V_Model = 0, P_Model } public plugin_init() { register_plugin("Knife Levels", "1.0", "lux") // Fakemeta register_forward(Fw_KnifeMenuHandler, "Fw_KnifeMenuHandler") // Commands register_clcmd("say /knife", "KnifeCommandHandler") } public plugin_precache() { new iIndex; // Prechace models for(iIndex = 0; iIndex <= charsmax(g_szKnife1); iIndex++) precache_model(g_szKnife1[iIndex]) for(iIndex = 0; iIndex <= charsmax(g_szKnife2); iIndex++) precache_model(g_szKnife2[iIndex]) for(iIndex = 0; iIndex <= charsmax(g_szKnife3); iIndex++) precache_model(g_szKnife3[iIndex]) for(iIndex = 0; iIndex <= charsmax(g_szKnife4); iIndex++) precache_model(g_szKnife4[iIndex]) for(iIndex = 0; iIndex <= charsmax(g_szKnife5); iIndex++) precache_model(g_szKnife5[iIndex]) for(iIndex = 0; iIndex <= charsmax(g_szKnife6); iIndex++) precache_model(g_szKnife6[iIndex]) for(iIndex = 0; iIndex <= charsmax(g_szKnife7); iIndex++) precache_model(g_szKnife7[iIndex]) for(iIndex = 0; iIndex <= charsmax(g_szKnife8); iIndex++) precache_model(g_szKnife8[iIndex]) // Prechace sounds for(iIndex = 0; iIndex <= charsmax(g_szKnife1Sounds); iIndex++) precache_sound(g_szKnife1Sounds[iIndex]) for(iIndex = 0; iIndex <= charsmax(g_szKnife1Sounds); iIndex++) precache_sound(g_szKnife1Sounds[iIndex]) } public KnifeCommandHandler(id) { new iMenu = menu_create("Knives Menu:", "KnifeMenuHandler") menu_additem(iMenu, "\rKnife 1", "", 0) menu_additem(iMenu, "\rKnife 2", "", 0) menu_additem(iMenu, "\rKnife 3", "", 0) menu_additem(iMenu, "\rKnife 4", "", 0) menu_additem(iMenu, "\rKnife 5", "", 0) menu_additem(iMenu, "\rKnife 6", "", 0) menu_additem(iMenu, "\rKnife 7", "", 0) menu_setprop(iMenu, MPROP_EXIT, MEXIT_ALL) menu_display(id, iMenu, 0) // No more replies needed from the server... return PLUGIN_HANDLED } public KnifeMenuHandler(id, iMenu, iItem) { switch (iMenu) { case 0: { if (ze_get_user_level(id) >= 4) { // Player level from 1 to 5 set him this knife cs_set_player_view_model(id, CSW_KNIFE, g_szKnife1[V_Model]) cs_set_player_weap_model(id, CSW_KNIFE, g_szKnife1[P_Model]) ResetKnife(id) } } case 1: { if (ze_get_user_level(id) >= 9) { // Player level from 5 to 8 set him this knife cs_set_player_view_model(id, CSW_KNIFE, g_szKnife2[V_Model]) cs_set_player_weap_model(id, CSW_KNIFE, g_szKnife2[P_Model]) ResetKnife(id) } } case 2: { if (ze_get_user_level(id) >= 14) { // Player level from 5 to 8 set him this knife cs_set_player_view_model(id, CSW_KNIFE, g_szKnife3[V_Model]) cs_set_player_weap_model(id, CSW_KNIFE, g_szKnife3[P_Model]) ResetKnife(id) } } case 3: { if (ze_get_user_level(id) >= 19) { // Player level from 5 to 8 set him this knife cs_set_player_view_model(id, CSW_KNIFE, g_szKnife4[V_Model]) cs_set_player_weap_model(id, CSW_KNIFE, g_szKnife4[P_Model]) ResetKnife(id) } } case 4: { if (ze_get_user_level(id) >= 24) { // Player level from 26 to 30 set him this knife cs_set_player_view_model(id, CSW_KNIFE, g_szKnife5[V_Model]) cs_set_player_weap_model(id, CSW_KNIFE, g_szKnife5[P_Model]) ResetKnife(id) } } case 5: { if (ze_get_user_level(id) >= 29) { // Player level from 26 to 30 set him this knife cs_set_player_view_model(id, CSW_KNIFE, g_szKnife6[V_Model]) cs_set_player_weap_model(id, CSW_KNIFE, g_szKnife6[P_Model]) ResetKnife(id) } } case 6: { if (ze_get_user_level(id) >= 50) { // Player level from 26 to 30 set him this knife cs_set_player_view_model(id, CSW_KNIFE, g_szKnife7[V_Model]) cs_set_player_weap_model(id, CSW_KNIFE, g_szKnife7[P_Model]) ResetKnife(id) } } } return PLUGIN_HANDLED } public ResetKnife(id) { rg_remove_item(id, "weapon_knife") rg_give_item(id, "weapon_knife", GT_APPEND) engclient_cmd(id, "weapon_knife") KnifeMenuHandler(id, CHAN_BODY, "items/gunpickup2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM) } public KnifeMenuHandler(id, iMenu, iItem) { if(!is_user_alive(id) || ze_is_user_zombie(id)) return FMRES_IGNORED if (ze_get_user_level(id) >= 0 && ze_get_user_level(id) < 0) { for(new iIndex = 0; iIndex <= charsmax(g_szDefaultSounds); iIndex++) { if (equal(g_szDefaultSounds[iIndex], szSound)) { KnifeMenuHandler(id, iMenu, g_szKnife1Sounds[iIndex], 1.0, ATTN_NORM, 0, PITCH_NORM) return FMRES_SUPERCEDE } } } else if (ze_get_user_level(id) >= 0 && ze_get_user_level(id) < 5) { for(new iIndex = 0; iIndex <= charsmax(g_szDefaultSounds); iIndex++) { if (equal(g_szDefaultSounds[iIndex], szSound)) { KnifeMenuHandler(id, iMenu, g_szKnife2Sounds[iIndex], 1.0, ATTN_NORM, 0, PITCH_NORM) return FMRES_SUPERCEDE } } } else if (ze_get_user_level(id) >= 5 && ze_get_user_level(id) < 9) { for(new iIndex = 0; iIndex <= charsmax(g_szDefaultSounds); iIndex++) { if (equal(g_szDefaultSounds[iIndex], szSound)) { KnifeMenuHandler(id, iMenu, g_szKnife3Sounds[iIndex], 1.0, ATTN_NORM, 0, PITCH_NORM) return FMRES_SUPERCEDE } } } else if (ze_get_user_level(id) >= 10 && ze_get_user_level(id) < 14) { for(new iIndex = 0; iIndex <= charsmax(g_szDefaultSounds); iIndex++) { if (equal(g_szDefaultSounds[iIndex], szSound)) { KnifeMenuHandler(id, iMenu, g_szKnife4Sounds[iIndex], 1.0, ATTN_NORM, 0, PITCH_NORM) return FMRES_SUPERCEDE } } } else if (ze_get_user_level(id) >= 15 && ze_get_user_level(id) < 20) { for(new iIndex = 0; iIndex <= charsmax(g_szDefaultSounds); iIndex++) { if (equal(g_szDefaultSounds[iIndex], szSound)) { KnifeMenuHandler(id, iMenu, g_szKnife5Sounds[iIndex], 1.0, ATTN_NORM, 0, PITCH_NORM) return FMRES_SUPERCEDE } } } else if (ze_get_user_level(id) >= 21 && ze_get_user_level(id) < 30) { for(new iIndex = 0; iIndex <= charsmax(g_szDefaultSounds); iIndex++) { if (equal(g_szDefaultSounds[iIndex], szSound)) { KnifeMenuHandler(id, iMenu, g_szKnife6Sounds[iIndex], 1.0, ATTN_NORM, 0, PITCH_NORM) return FMRES_SUPERCEDE } } } else if (ze_get_user_level(id) >= 31 && ze_get_user_level(id) < 40) { for(new iIndex = 0; iIndex <= charsmax(g_szDefaultSounds); iIndex++) { if (equal(g_szDefaultSounds[iIndex], szSound)) { KnifeMenuHandler(id, iMenu, g_szKnife7Sounds[iIndex], 1.0, ATTN_NORM, 0, PITCH_NORM) return FMRES_SUPERCEDE } } } else if (ze_get_user_level(id) >= 49 && ze_get_user_level(id) < 50) { for(new iIndex = 0; iIndex <= charsmax(g_szDefaultSounds); iIndex++) { if (equal(g_szDefaultSounds[iIndex], szSound)) { KnifeMenuHandler(id, iMenu, g_szKnife8Sounds[iIndex], 1.0, ATTN_NORM, 0, PITCH_NORM) return FMRES_SUPERCEDE } } } return FMRES_IGNORED }
Well i have good knife menu that we have converted if any one wants u can pm me :v
51.79.157.106:27017
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute
Sign in
Who is online
Users browsing this forum: No registered users and 1 guest