Hi. I'm trying to change the weapon wear on the player's active weapon, but with no luck.
Code:
public Action Cmd_SetWear
(int id, int iArgs
)
{
char szWear
[16]
GetCmdArg
(1, szWear, sizeof
(szWear
))
new iEnt = GetEntPropEnt
(id, Prop_Send,
"m_hActiveWeapon")
SetEntPropFloat(iEnt, Prop_Send, "m_flFallbackWear", StringToFloat(szWear))
return Plugin_Handled
}
I only managed to change this while giving the weapon, but not after it has been equipped.
Is there a way of doing this? I want to change the wear without re-equipping the weapon, so the change will be immediate (no equip animation).
Also, is it possible to retrieve the weapon's name and quality? I'm talking about the skin's name, e.g. Dragon Lore and the quality, e.g. Covert.
PS: I am aware that Valve doesn't allow for fake skins in servers. I'm making this plugin for an offline LAN server, strictly for the purpose of creating a video.
__________________