Jump to content

Having troubles with Events..


novo

Recommended Posts

Hello,

I'm having troubles with triggering client events from server-side. (Client event not found)

Server:

  
triggerEvent("loadDepend", source, arena, pickups) --# Global Server 
  

  
addEvent("loadDepend", true) 
addEventHandler("loadDepend", root, function(arena, pickups) 
    outputChatBox("TRYING TO LOAD DEPENDENCES") 
    triggerClientEvent(source, "loadPickups", root, pickups) 
end) 
  

Client:

  
function loadPickups(pickups) 
outputChatBox("PICKUPS RECIEVED") 
end 
addEvent("loadPickups", true) 
addEventHandler("loadPickups", root, loadPickups) 
  

Thanks in advance.

Link to comment
  • MTA Team

I have had issues with events before and the only thing that worked for me was to create a new Lua file and put the contents of the old one in the new one. I think you have accidentally switched the compilation to something else, which doesn't understand what you're doing.

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