Jump to content

onClientMarkerHit Event


Sorato

Recommended Posts

Posted

Hello,

The following function should be a Client function:

function chat(hitPlayer, matchingDimension)

outputChatBox("Test123")

end

addEventHandler("onClientMarkerHit", getRootElement(), chat)

Why does it get triggered for a Client when another Client runs into the Marker? (Every player gets the chat message :o)

Posted

But why? If i use Client Events shouldn't they specifically be made for the Client? What's the sense or the use of the Client being aware of other Clients?

Posted

No. For example, you want to display a text on your screen when a player enters a marker. A lot of things, like displaying text, are only clientside available (simply because the server is just passing through and modifying data between clients and not rendering anything), so you do a clientside script using onClientMarkerHit.

Posted

Client-side script means a script that runs on the client's computer, not something that doesn't work with multiple clients. If client was unaware of other clients, it wouldn't be multiplayer.

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