cokacola Posted June 5, 2009 Share Posted June 5, 2009 Hello, quick question, is there a specific way to make a GUI window show for only one person? I have a client side event and it is triggered serverside, but it shows for all players. I cant find any way to stop it.. Link to comment
robhol Posted June 5, 2009 Share Posted June 5, 2009 As a general rule, if you have a problem with your code: POST IT. (Pastebin.com and post the link, that is.) This looks fairly simple though. Make sure your clientside addEventHandler looks like this: addEventHandler("myEvent", getLocalPlayer(), myFunction); Also, make sure your triggerClientEvent line looks like this: triggerClientEvent (somePlayer, "myEvent", sourceElement, [arguments...] ) Link to comment
cokacola Posted June 5, 2009 Author Share Posted June 5, 2009 Thanks that method did work, no more showing GUIs to everyone for no apparent reason thanks again Link to comment
darkdreamingdan Posted June 6, 2009 Share Posted June 6, 2009 This looks fairly simple though. Make sure your clientside addEventHandler looks like this:addEventHandler("myEvent", getLocalPlayer(), myFunction) That's not really true. The base element can be anything, it does not affect the triggerTo target. Link to comment
Lordy Posted June 7, 2009 Share Posted June 7, 2009 Well unless it's triggered triggerEvent(eventname,thePlayerToTrigger,parameters). Then setting local player as root in client side event handler should work too I thinks 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