eae Gente entao eu to usando ZPS do perfect e eu coloquei plugin knife menu. so que agora o berserker ta podendo mudar de faca sendo que eu quero que ele fique com a que eu coloquei la na zombie_plague_special.ini. Ajudem pls!!!
Plugin:
Plugin:
Código:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <zombie_plague_special>
#define PLUGIN "Knife Menu"
#define VERSION "1.0"
#define AUTHOR "Biel-oGrande"
new g_skin[33]
new v_butterfly[64] = "models/v_butterfly.mdl"
new p_butterfly[64] = "models/p_butterfly.mdl"
new v_flip[64] = "models/v_strong_dragon.mdl"
new p_flip[64] = "models/p_strong_dragon.mdl"
new v_gut[64] = "models/v_gut.mdl"
new p_gut[64] = "models/p_gut.mdl"
new v_huntsman[64] = "models/v_huntsman.mdl"
new p_huntsman[64] = "models/p_huntsman.mdl"
new v_karambit[64] = "models/v_executioner_axe.mdl"
new p_karambit[64] = "models/p_executioner_axe.mdl"
new v_m9_bayonet[64] = "models/v_m9_bayonet.mdl"
new p_m9_bayonet[64] = "models/p_m9_bayonet.mdl"
new v_mrsub[64] = "models/v_knife_mrsub.mdl"
new p_mrsub[64] = "models/p_knife_mrsub.mdl"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("CurWeapon","checkWeapon","be","1=1")
register_event("WeapPickup","checkModel","b","1=19")
register_clcmd("say /knife", "knife_menu")
register_clcmd("say_team /knife", "knife_menu")
}
public plugin_precache() {
precache_model(v_butterfly)
precache_model(p_butterfly)
precache_model(v_flip)
precache_model(p_flip)
precache_model(v_gut)
precache_model(p_gut)
precache_model(v_huntsman)
precache_model(p_huntsman)
precache_model(v_karambit)
precache_model(p_karambit)
precache_model(v_m9_bayonet)
precache_model(p_m9_bayonet)
precache_model(v_mrsub)
precache_model(p_mrsub)
}
public knife_menu(id) {
new szMenu[128], szName[32]
get_user_name(id, szName, charsmax(szName))
formatex(szMenu, 127, "Knife Menu")
new Menu = menu_create(szMenu, "handler_knife_menu")
formatex(szMenu, 63, "%sOriginal", g_skin[id] == 0 ? "\d":"\w")
menu_additem(Menu, szMenu, "1", 0)
formatex(szMenu, 63, "%sButterfly", g_skin[id] == 1 ? "\d":"\w")
menu_additem(Menu, szMenu, "2", 0)
formatex(szMenu, 63, "%sStrong Dragon", g_skin[id] == 2 ? "\d":"\w")
menu_additem(Menu, szMenu, "3", 0)
formatex(szMenu, 63, "%sGut", g_skin[id] == 3 ? "\d":"\w")
menu_additem(Menu, szMenu, "4", 0)
formatex(szMenu, 63, "%sHuntsman", g_skin[id] == 4 ? "\d":"\w")
menu_additem(Menu, szMenu, "5", 0)
formatex(szMenu, 63, "%sIce Knife", g_skin[id] == 5 ? "\d":"\w")
menu_additem(Menu, szMenu, "6", 0)
formatex(szMenu, 63, "%sM9 Bayonet", g_skin[id] == 6 ? "\d":"\w")
menu_additem(Menu, szMenu, "7", 0)
formatex(szMenu, 63, "%sTwo Knives", g_skin[id] == 7 ? "\d":"\w")
menu_additem(Menu, szMenu, "8", 0)
menu_setprop(Menu, MPROP_EXITNAME, "Exit")
menu_display(id, Menu, 0)
}
public handler_knife_menu(id, menu, item) {
if(item == MENU_EXIT) {
menu_destroy(menu)
return PLUGIN_HANDLED
}
switch(item) {
case 0: g_skin[id] = 0
case 1: g_skin[id] = 1
case 2: g_skin[id] = 2
case 3: g_skin[id] = 3
case 4: g_skin[id] = 4
case 5: g_skin[id] = 5
case 6: g_skin[id] = 6
case 7: g_skin[id] = 7
}
knife_menu(id)
checkModel(id)
return PLUGIN_HANDLED
}
public checkWeapon(id) {
new plrClip, plrAmmo
new plrWeapId
plrWeapId = get_user_weapon(id, plrClip , plrAmmo)
if(plrWeapId == CSW_KNIFE) {
checkModel(id)
}
return PLUGIN_HANDLED
}
public checkModel(id) {
if(zp_get_user_zombie(id)) return PLUGIN_HANDLED
new plrClip, plrAmmo
new plrWeapId
plrWeapId = get_user_weapon(id, plrClip , plrAmmo)
if(plrWeapId == CSW_KNIFE) {
if(g_skin[id] == 0) {
set_pev(id, pev_viewmodel2, "models/v_dark_knife.mdl")
set_pev(id, pev_weaponmodel2, "models/p_knife.mdl")
}
else if(g_skin[id] == 1) {
set_pev(id, pev_viewmodel2, v_butterfly)
set_pev(id, pev_weaponmodel2, p_butterfly)
}
else if(g_skin[id] == 2) {
set_pev(id, pev_viewmodel2, v_flip)
set_pev(id, pev_weaponmodel2, p_flip)
}
else if(g_skin[id] == 3) {
set_pev(id, pev_viewmodel2, v_gut)
set_pev(id, pev_weaponmodel2, p_gut)
}
else if(g_skin[id] == 4) {
set_pev(id, pev_viewmodel2, v_huntsman)
set_pev(id, pev_weaponmodel2, p_huntsman)
}
else if(g_skin[id] == 5) {
set_pev(id, pev_viewmodel2, v_karambit)
set_pev(id, pev_weaponmodel2, p_karambit)
}
else if(g_skin[id] == 6) {
set_pev(id, pev_viewmodel2, v_m9_bayonet)
set_pev(id, pev_weaponmodel2, p_m9_bayonet)
}
else if(g_skin[id] == 7) {
set_pev(id, pev_viewmodel2, v_mrsub)
set_pev(id, pev_weaponmodel2, p_mrsub)
}
}
return PLUGIN_HANDLED
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1046\\ f0\\ fs16 \n\\ par }
*/