Drakath Posted October 26, 2014 Share Posted October 26, 2014 local x, y, z = getElementPosition(localPlayer) local marker = createMarker(x, y, z-1, "cylinder", 1, 0, 255, 0, 80) triggerServerEvent("myEvent", resourceRoot, x, y, z, marker) Why can't it pass marker? This works if I remove marker from extra arguments in triggerServerEvent but with marker it just doesn't trigger the event. Link to comment
Saml1er Posted October 26, 2014 Share Posted October 26, 2014 I once had the same problem (It was the onZombieWasted eveny from zombies resource.) I fixed using this: triggerServerEvent("myEvent", resourceRoot,{ x, y, z, marker} ) Link to comment
Addlibs Posted October 26, 2014 Share Posted October 26, 2014 You can't send client-side elements to the server. isElementLocal Link to comment
Drakath Posted October 26, 2014 Author Share Posted October 26, 2014 So I can't pass server objects to client either? Link to comment
MTA Team botder Posted October 26, 2014 MTA Team Share Posted October 26, 2014 @serverside -> clientside The marker hasn't been created clientside yet and the event is faster than the actual marker creation. Link to comment
TAPL Posted October 27, 2014 Share Posted October 27, 2014 @serverside -> clientsideThe marker hasn't been created clientside yet and the event is faster than the actual marker creation. What? So I can't pass server objects to client either? You can send server side elements to client side but not the vice versa. Same case? https://forum.multitheftauto.com/viewtopic.php?f=91&t=81953 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