Jump to content

Is something bugging?


Recommended Posts

-- 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
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
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
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 by N3xT
Link to comment
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?

  • Like 1
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...