[DarkRP] Nightvision addon for single job

I have the nightvision mod http://steamcommunity.com/sharedfiles/filedetails/?id=138163375&requirelogin=true and I want to make it so only my sewer monster job is able to use it.

(User was banned for this post ("missed the darkrp thread" - postal))

You can try something along the lines of

if ply:Team() ~= TEAM_NAME then return end

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.