Jump to content

[HELP] Script


Skraund

Recommended Posts

Hello, I created a function that changes the color of the square from white to black on command. But I had a problem, the color should change only for the player who entered it, and it changes for all players on the server, how can I fix it?
Event handler:

addEventHandler( "onClientHUDRender", getRootElement(), d ) 

Link to comment
  • 2 weeks later...

I think you trigger events with getRootElement() server-side. If you use triggerServerEvent("someEvent",root,args) your local player here is source. BUT if you trigger client use this: triggerClientEvent("some_client_event", root, args). If you use getRootElement() instead of root , it will trigger for ALL player. Make sure u read wiki properly ^_^

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