Here's whats wrong. Everything compiles correctly etc. But when I change my model. It changes to a model that isnt even in there. like, for example, When you turn urself into a chicken. It turns you into a miget ct? That's exactly what it does. That model isnt even in the precache let alone my whole code or the model/player/modelnum folder. Any idea?
Code:
//********************************************************************
//* MiniModel Changing mod by no0bsawce! aka Da_sk8rboy *
//* Cmd: *
//* amx_model <target> <model num> *
//* Number choices: ( 1 || 2 || 3 ) *
//********************************************************************
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#define PLUGIN "minimodel"
#define VERSION "1.00a"
#define AUTHOR "no0bsawce!"
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_concmd("amx_model", "cmd_model",0, "<target> <model num>")
}
public cmd_model(id, level, cid)
{
if (!cmd_access(id, level, cid, 3))
return PLUGIN_HANDLED
new Arg1[32], Arg2[3]
read_argv(1, Arg1, 31)
read_argv(2, Arg2, 2)
new player = cmd_target(id, Arg1, 0)
//Flags:
//1 - obey immunity
//2 - allow yourself
//4 - must be alive
//8 - can't be bot
if (!player)
{
console_print(id, "[Model_Mod] player %s could not be found or targetted!", Arg1)
return PLUGIN_HANDLED
}
else
{
switch(str_to_num(Arg2))
{
case 2: cs_set_user_model(player, "model2")
case 3: cs_set_user_model(player, "model3")
default: cs_set_user_model(player, "model1")
}
}
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")
}
__________________