Hi ,
I have seen loooots of places where they show how to replace knife skin/model with custom ones .... well that is not exactly what i want ... what i want is
Script :
PHP Code:
#include <amxmodx>
#include <fakemeta_util>
#define PLUGIN "Knife"
#define VERSION "1.0"
#define AUTHOR "Sam"
new Model[] = "models/model.mdl"
new Model1[] = "models/model1.mdl"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
new keys = MENU_KEY_0|MENU_KEY_1|MENU_KEY_2;
register_menucmd(register_menuid("Test knife"), keys, "ChooseKnife");
// Clcmd
register_clcmd("say /Test", "Test");
}
public plugin_precache()
{
precache_model(Model)
precache_model(Model1)
}
public Test(id)
{
new menu[192];
new keys = MENU_KEY_0|MENU_KEY_1|MENU_KEY_2
format(menu, 191, "Test knife^n^n1. Knife1^n2. Knife2")
show_menu(id, keys, menu)
return PLUGIN_CONTINUE
}
public ChooseChar(id, key)
{
switch (key)
{
case 1:
{
fm_strip_user_weapons(id)
fm_give_item(id, Model)
}
case 2:
{
fm_strip_user_weapons(id)
fm_give_item(id, Model1)
}
}
return PLUGIN_HANDLED;
}
If Option 1 is selected ... I want him to be given Model knife ... and if Option 2 is selected ... i want him to be given Model1 knife.
__________________