I have a script up and running that detects when a key is pressed. I have done this:
PHP Code:
player.(@ clientr.equipped[2]).trigger("PrimaryFunction", "");
Where
clientr.equipped[2] is the name of a weapon, called WeaponMelee (which has a function called
onPrimaryFunction)
For some reason, it is refusing to work. Is there some sort of function that returns a weapon object?
Also, the key detection is working fine.
EDIT: Tried
findWeapon() with no luck.