cokacola Posted June 5, 2009 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.. Also known as Bizzycola. In fact, if I could change my nick to that I would.
robhol Posted June 5, 2009 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...] ) Do NOT PM ME for help unless invited. - New MTA Script Editor Scripting help "etiquette": understandable language, relevant code (ALL code if unsure), [Lua] tags, error messages with line numbers. Super simple stuff.
cokacola Posted June 5, 2009 Author Posted June 5, 2009 Thanks that method did work, no more showing GUIs to everyone for no apparent reason thanks again Also known as Bizzycola. In fact, if I could change my nick to that I would.
darkdreamingdan Posted June 6, 2009 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. VCP FOREVER!
Lordy Posted June 7, 2009 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
robhol Posted June 7, 2009 Posted June 7, 2009 #cear, it works. Do NOT PM ME for help unless invited. - New MTA Script Editor Scripting help "etiquette": understandable language, relevant code (ALL code if unsure), [Lua] tags, error messages with line numbers. Super simple stuff.
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