How do I get the Player who called the function in client side file.
0 replies, posted
Hey, so I have a function in my cl_init file.
I want that function to be called only by the member of a specific team.
What I tried was:
[code]
function teamFunction(ply)
if (ply:Team()==1) then
--Do stuff
end
end
[/code]
I also did:
[code]
function teamFunction(ply)
if (LocalPlayer():Team()==1) then
--Do stuff
end
end
[/code]
but no avail, so if not with "LocalPlayer()" and not by default, how do I defined that "ply" is the player calling the function?
EDIT: yep I did fuck something up sorry to trouble you guys!
Sorry, you need to Log In to post a reply to this thread.