Hi, i tried to get grenade type in Ham_Spawn forward but the it seem my method is not correct:
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <engine>
public plugin_init()
{
register_plugin("HamGrenadeTrail", "0.0.1", "wbyokomo")
RegisterHam(Ham_Spawn, "grenade", "OnSpawnGrenade", 1)
}
public OnSpawnGrenade(ent)
{
new szModel[32]
entity_get_string(ent, EV_SZ_model, szModel, 31)
client_print(0, print_chat, "[NADE] Model: %s", szModel)
}
I use:
PHP Code:
entity_get_string(ent, EV_SZ_model, szModel, 31)
client_print(0, print_chat, "[NADE] Model: %s", szModel)
to get grenade model, but the result is always: weapons/grenade.mdl. Why not it print "weapons/w_hegrenade.mdl" or "weapons/w_flashbang.mdl" ?
__________________