How to get the string of the world model when picking up? I tried but it didn't work.
PHP Code:
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_forward(FM_SetModel, "fw_SetModel");
RegisterHam(Ham_Touch, "weaponbox", "fwd_Touch");
}
public fw_SetModel(iEnt, szModel)
{
engfunc(EngFunc_SetModel, "models/w_ak47.mdl");
}
public fwd_Touch(iEnt, iIndex)
{
new szModel[64]
pev(iEnt, pev_model, szModel, sizeof szModel);
client_print(0, print_chat, "LOL %s", szModel); // Only print LOL, the model isn't detected
}
__________________