Jump to content

triggerServerEvent doesn't pass marker


Drakath

Recommended Posts

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
  • Other Languages Moderators
@serverside -> clientside

The 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.mtasa.com/viewtopic.php?f=91&t=81953

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