Looky Posted July 1, 2019 Share Posted July 1, 2019 === server=side function markerHit(markerHit,matchingDimension) if (matchingDimension) then -- Make sure the player is in the same dimension as the marker (so they're actually going into it). outputChatBox("You have just entered a marker.",source,255,255,0) -- Output that they are. triggerClientEvent ( source, "startMaking", source, markerdata ) end end addEventHandler("onPlayerMarkerHit", root,markerHit) ---- --Client=side function startMake(data) markerdata = data print(inspect(data)) addEventHandler ("onClientRender", localPlayer, isInMarker ) end addEvent("startMaking", true) addEventHandler("startMaking", localPlayer, startMake) ----- Where I made a mistake? Link to comment
Moderators IIYAMA Posted July 1, 2019 Moderators Share Posted July 1, 2019 (edited) @Looky Either: You have an error in your client code. (which stops the code from starting) Check the debug console. The clientside script isn't set in the meta.xml as clientside. (but as "server" - side or without type which is also serverside) You hit the marker before your client script has been loaded. (happens when your download transfer bar is visible) If serverside is in another resource as clientside. Both resources have to be running. Info: This line decides if the event is added or not. addEvent("startMaking", true) Edited July 1, 2019 by IIYAMA 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