Piorun Posted August 6, 2015 Share Posted August 6, 2015 Hi, I want to ask is this possible to check if i am on client or server side in shared .lua files? I mean i want to make some function for ex. named checkSide() and just make some if. How? function checkSide() if clientSide then -- something happens when function is called client side else -- something happens when function is called server side end end Link to comment
GTX Posted August 6, 2015 Share Posted August 6, 2015 You can check if specific function exist. function checkSide() if triggerServerEvent then -- It's client side else -- It's server side end end Link to comment
Piorun Posted August 6, 2015 Author Share Posted August 6, 2015 Thanks for fast replay Very helpfull . Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now