There is no more code, I've been even trying with get_user_frags(id), but still same problem, it didnt help.
Code:
public cbMyMenu(id, menu, item){
static stats[8]
new prefix[10];
if(!is_user_alive(id)){
ColorChat(id, GREEN, "[%s]^x01 Nie mozesz zmienic noza bedac niezywym", prefix);
return PLUGIN_HANDLED
}
get_pcvar_string(g_cPrefix, prefix, charsmax(prefix));
switch(item){
case 0:{
if(stats[0] < 50){
client_print(id, print_chat, "You cant use this knife");
return PLUGIN_HANDLED
}
else SetKnife(id, 0)
}
}
return PLUGIN_CONTINUE
}
public SetKnife(id , Knife) {
knife_model[id] = Knife
new Clip, Ammo, Weapon = get_user_weapon(id, Clip, Ammo)
if ( Weapon != CSW_KNIFE )
return PLUGIN_HANDLED
new vModel[56],pModel[56]
switch(Knife)
{
case 0: {
format(vModel,55,"models/v_knife.mdl")
format(pModel,55,"models/p_knife.mdl")
}
}
entity_set_string(id, EV_SZ_viewmodel, vModel)
entity_set_string(id, EV_SZ_weaponmodel, pModel)
return PLUGIN_HANDLED;
}