What koz failed to mention is that ply isn’t a default function, and needs to be defined.
I find that it would simply be easier to replace ply: with LocalPlayer():
Especially if there are multiple functions, I don’t think local variables are carried across functions.
[editline]10th July 2013[/editline]
But I’m glad I’m not the only person who uses the night vision mod. Personally though, I modified mine to remove that player and npc targeting system, i found it very distracting and simply turned nightvision into some sort of aimassist.