PotatoHead Posted August 25, 2013 Posted August 25, 2013 I have a question like the title states. I am wondering if I have files set up like so: MTA Server/mods/deathmatch/resources/login/login_c.lua Then I have a file like so: MTA Server/mods/deathmatch/resources/login/arena_c.lua So my question is "Can I use 'triggerClientEvent' in the login file to trigger something in the arena file? I tested it and it didnt seem to work so I decided to ask.
golanu21 Posted August 25, 2013 Posted August 25, 2013 trrigerClientEvent is used just in Server is make the transmision betwen login_s, to an event in login_c, what you need there is an export
PotatoHead Posted August 25, 2013 Author Posted August 25, 2013 Aww damn could you explain how to use that. I checked the wiki but it is confusing to me. And thanks
Sasu Posted August 25, 2013 Posted August 25, 2013 If you are in the same resource, you can use as normal function. yourFunctionName()
PotatoHead Posted August 25, 2013 Author Posted August 25, 2013 Oh okay so say I am runnning a client function called myRes that is in the arena_c. I wouls use this in the login_c myRes() and that would run it?
PotatoHead Posted August 25, 2013 Author Posted August 25, 2013 Thanks for the help everyone but I cant seem to get anything to work... I dont really understand the Export and call functions and what Sasuke* suggested isnt working right now.
PotatoHead Posted August 25, 2013 Author Posted August 25, 2013 call has been suggested. I don understand it. And triggerEvent I dont think it will wont but I will try it and get back to you.
denny199 Posted August 26, 2013 Posted August 26, 2013 triggerEvent, will work. For example in login_c.lua is there a function for hiding the window, and you want to show the other windows while it hiding and you have on arenas_c.lua a eventhandler called "derp:polate", then you can use this: triggerEvent ( "derp:polate", localPlayer ) feel free to ask us more if you still can't figure out.
PotatoHead Posted August 26, 2013 Author Posted August 26, 2013 Well thanks denny will try this today. Thanks for the help everyone. I will be making a post for my gamemode soon.
PotatoHead Posted August 26, 2013 Author Posted August 26, 2013 Well triggerEvent worked. Thanks guys!
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