Jump to content

Calling functions


Recommended Posts

If this other script is client-side, then yes.

Thank you. :)

2 more questions, I do not wanted to create new topic for these:

1; A global variable can be used in both client- and server-side, or only in one side?

2; If I create a variable client-side, it will be created for all clients, who will use this var, or it would be created once and every clients will use it, so they will delete/replace it's value?

Link to comment
If this other script is client-side, then yes.

Thank you. :)

2 more questions, I do not wanted to create new topic for these:

1; A global variable can be used in both client- and server-side, or only in one side?

2; If I create a variable client-side, it will be created for all clients, who will use this var, or it would be created once and every clients will use it, so they will delete/replace it's value?

1. No, in order for a client or server global variable to be used on the other side, it has to be transmitted or transferred using triggerClientEvent or triggerServerEvent. I believe you can use setElementData, but please don't use that, it's specifically for element data. :|

2. I don't think you're familiar with the terminology, so a client -- is an individual user, a server is an entity or a user that serves information to these individuals or "clients." So to answer your question, when you create a variable client-side, it will only be used when the individual's script parser executes it. Individuals do not share information among other individuals unless triggerEvent 's are used or again, setElementData.

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...