Force a player to press a key/ colon method arguments on a function

So are there any functions that force a player to press a key? Specifically, I need to force a player to MWHEELUP/MWHEELDOWN; I thought there would be a console command specific to this (Like +walk, +jump, +lookup, etc ) but I havn’t been able to find one. Any help?

Also, on a slightly unrelated question (I didn’t think that I need to make 2 threads for this), how do you properly set up a colon operator for a function?
So I can enter arguments on custom functions like

[lua] ply:CustomFunction() [/lua] etc.
What explanations I’ve found on this on the web already have been somewhat incomprehensible to me. Thanks in advance!

Buy default they mwheelup/down are bound to:
mwheelup - invprev
mwheeldown - invnext
If that helps any.

You can’t simulate a button-press like that, you’ll have to use other methods.
In the code you posted, the colons means that you’re calling CustomFunction() with ply as the first argument, it’s the same as doing ply.CustomFunction(ply), to create one you do this:
[lua]
local pmeta = FindMetaTable(“Player”)

function pmeta:SomeFunction()
self:ChatPrint(“Hey, I just called SomeFunction on you!”) --self is the player you called the function on (ex: ply:SomeFunction(), ply is self in that case)
end
[/lua]

Many thanks