Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#define PLUGIN "Model_Me_Mod123"
#define VERSION "1.00a"
#define AUTHOR "Da_sk8rboy"
new g_Switch;
new menu[192];
new keys = MENU_KEY_0 | MENU_KEY_1 | MENU_KEY_2 | MENU_KEY_3 | MENU_KEY_4
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_concmd("amx_modelme", "show_menu");
register_menu("menu_show",1023,"menu_choose");
g_Switch = register_cvar("cm_switch","1");
register_cvar("cm_modelme1", "5000")
register_cvar("cm_modelme2", "8000")
register_cvar("cm_modelme3", "16000")
}
public menu_show(id)
{
if(get_pcvar_num(g_Switch)==0)
{
return PLUGIN_HANDLED;
}else{
format(menu,191,"[AMX] Models^n1. Model1^n.2 Model2^n3. Model3^n^n.Exit");
show_menu(id,keys,menu,-1,"show_menu");
return PLUGIN_CONTINUE;
}
return PLUGIN_HANDLED;
}
public choose_menu(id,key)
{
switch(key)
{
case 0 : cs_set_user_model(id, "modelme2")
case 1 : cs_set_user_model(id, "modelme3")
case 2 : cs_set_user_model(id, "modelme1")
}
return PLUGIN_HANDLED;
}
public plugin_precache()
{
precache_model("models/player/model1/model1.mdl");
precache_model("models/player/model2/model2.mdl");
precache_model("models/player/model3/model3.mdl");
}
Menu will not come up when i use the cmd, anyone know whats wrong? it compiles ok, no errors!
__________________