redditing Posted July 5, 2020 Share Posted July 5, 2020 -- server side Cylinder1 = createMarker(3139.8, -3254.3, 123.22222, "cylinder", 1.0, 0, 255, 255, 255) function TEST(playerhit) if isElementWithinMarker(playerhit, Cylinder1) then outputChatBox("U hit marker", root) end end addEventHandler("onMarkerHit", Cylinder1, TEST) I am surprised because I am sure that everything is fine but when I stick to the "cylinder1" marker, nothing happens, and according to the script it should show me that I hit this marker, but nothing is happening, someone has some idea because it is very strange.. Link to comment
nxFairlywell Posted July 5, 2020 Share Posted July 5, 2020 (edited) check meta.xml or remove "isElementWithinMarker" function and output the message directly Edited July 5, 2020 by VenomNX Link to comment
redditing Posted July 5, 2020 Author Share Posted July 5, 2020 Just now, VenomNX said: meta.xml? -- meta.xml <script src="Testing.Lua" type="server"/> Link to comment
nxFairlywell Posted July 5, 2020 Share Posted July 5, 2020 Just now, redditing said: -- meta.xml <script src="Testing.Lua" type="server"/> Remove the if-statement "isElementWithinMarker" Link to comment
redditing Posted July 5, 2020 Author Share Posted July 5, 2020 5 minutes ago, VenomNX said: Remove the if-statement "isElementWithinMarker" it did nothing Link to comment
nxFairlywell Posted July 5, 2020 Share Posted July 5, 2020 Cylinder1 = createMarker(3139.8, -3254.3, 123.22222, "cylinder", 1.0, 0, 255, 255, 255) function TEST(playerhit) if source == Cylinder1 then if playerhit and getElementType(playerhit)=="player" then outputChatBox("U hit marker", root) end end end addEventHandler("onMarkerHit", root, TEST) Link to comment
redditing Posted July 5, 2020 Author Share Posted July 5, 2020 2 minutes ago, VenomNX said: Cylinder1 = createMarker(3139.8, -3254.3, 123.22222, "cylinder", 1.0, 0, 255, 255, 255) function TEST(playerhit) if source == Cylinder1 then if playerhit and getElementType(playerhit)=="player" then outputChatBox("U hit marker", root) end end end addEventHandler("onMarkerHit", root, TEST) Nothing ;/ Link to comment
redditing Posted July 5, 2020 Author Share Posted July 5, 2020 1 minute ago, VenomNX said: Okay, I have an idea, I'll create a new script and see if I have the same problem 1 Link to comment
nxFairlywell Posted July 5, 2020 Share Posted July 5, 2020 Just now, redditing said: Okay, I have an idea, I'll create a new script and see if I have the same problem That will fix the problem 1 Link to comment
N3xT Posted July 5, 2020 Share Posted July 5, 2020 (edited) 14 hours ago, redditing said: -- meta.xml <script src="Testing.Lua" type="server"/> <meta> <script src="file_name.lua" type="server"></script> </meta> edit file_name with the file you have Edited July 5, 2020 by N3xT Link to comment
redditing Posted July 5, 2020 Author Share Posted July 5, 2020 9 hours ago, VenomNX said: That will fix the problem -- server side Cylinder1 = createMarker(3139.8, -3254.3, 123.22222, "cylinder", 1.0, 0, 255, 255, 255) -- /\ -- old marker So yes, I added a new script in meta.xml after changing a few things, but also nothing happened, so I decided to copy another marker from another script and paste it where there is this "error", and it turned out that it works and this is the problem do you notice any here? 1 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