Which part of "there's no proper way to find p_model's entity" didn't you understand? What you are doing is getting weapon entity, not p_model entity.
In HamF_Item_Deploy_Post do something like:
PHP Code:
set_pev(id, pev_weaponmodel2, "") // Hide your p_model
if (!pev_valid(g_ent_weaponmodel[id]))
{
g_ent_weaponmodel[id] = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target")) // Create your p_model entity
if (!pev_valid(g_ent_weaponmodel[id])) return;
set_pev(g_ent_weaponmodel[id], pev_classname, "weapon_model")
set_pev(g_ent_weaponmodel[id], pev_movetype, MOVETYPE_FOLLOW)
set_pev(g_ent_weaponmodel[id], pev_aiment, id)
set_pev(g_ent_weaponmodel[id], pev_owner, id)
}
engfunc(EngFunc_SetModel, g_ent_weaponmodel[id], ak47red_P_MODEL)
Then you can set sequence, sub model or whatever you want.