Can't change the w_models ....
What wrong?
PHP Code:
public fw_SetModel(entity, const model[])
{
// Get damage time of grenade
static Float:dmgtime
pev(entity, pev_dmgtime, dmgtime)
new id = pev(entity, pev_owner)
// Grenade not yet thrown
if (dmgtime == 0.0)
return PLUGIN_CONTINUE
if (equal(model[7], "w_he", 4))
{
if (g_item[id][3])
{
// Give it a glow
fm_set_rendering(entity, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 255)
// And a colored trail
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(TE_BEAMFOLLOW) // TE id
write_short(entity) // entity
write_short(g_trailSpr) // sprite
write_byte(10) // life
write_byte(10) // width
write_byte(255) // r
write_byte(0) // g
write_byte(0) // b
write_byte(255) // brightness
message_end()
entity_set_model(entity, model_requip_hegrenade)
}
}
}