PotatoHead Posted August 25, 2013 Share 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. Link to comment
golanu21 Posted August 25, 2013 Share 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 Link to comment
PotatoHead Posted August 25, 2013 Author Share 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 Link to comment
TAPL Posted August 25, 2013 Share Posted August 25, 2013 I guess this is what you need. call Link to comment
Sasu Posted August 25, 2013 Share Posted August 25, 2013 If you are in the same resource, you can use as normal function. yourFunctionName() Link to comment
PotatoHead Posted August 25, 2013 Author Share 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? Link to comment
PotatoHead Posted August 25, 2013 Author Share 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. Link to comment
EstrategiaGTA Posted August 25, 2013 Share Posted August 25, 2013 call Click in 'call' and read it. Link to comment
PotatoHead Posted August 25, 2013 Author Share 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. Link to comment
denny199 Posted August 26, 2013 Share 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. Link to comment
PotatoHead Posted August 26, 2013 Author Share 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. Link to comment
PotatoHead Posted August 26, 2013 Author Share Posted August 26, 2013 Well triggerEvent worked. Thanks guys! 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