Jump to content

Checking side on shared files


Piorun

Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...