Jump to content

[QUESTION] create markers using tabel


the.king

Recommended Posts

hello guys, this is the code

 

Houses = {
	{"Home 1",2269.84937, -1210.49023, 1047.56250,2265.55688, -1210.51526, 1049.02344,90,10,1,100000,owner,22.99239, -7.52387, 3},
	{"Home 2",2269.84937, -1210.49023, 1047.56250,2265.55688, -1210.51526, 1049.02344,90,10,2,100000,owner,20.99239, -7.52387, 3},
	{"Home 3",2269.84937, -1210.49023, 1047.56250,2265.55688, -1210.51526, 1049.02344,90,10,3,100000,owner,18.99239, -7.52387, 3},
	{"Home 4",2269.84937, -1210.49023, 1047.56250,2265.55688, -1210.51526, 1049.02344,90,10,4,100000,owner,16.99239, -7.52387, 3},
	{"Home 5",2269.84937, -1210.49023, 1047.56250,2265.55688, -1210.51526, 1049.02344,90,10,5,100000,owner,14.99239, -7.52387, 3},
	{"Home 6",2269.84937, -1210.49023, 1047.56250,2265.55688, -1210.51526, 1049.02344,90,10,6,100000,owner,12.99239, -7.52387, 3},
	{"Home 7",2269.84937, -1210.49023, 1047.56250,2265.55688, -1210.51526, 1049.02344,90,10,7,100000,owner,10.99239, -7.52387, 3}
}
Markers = {}

for k,v in ipairs(Houses) do
Markers[k] = createMarker (v[13],v[14],v[15]+0.7,"arrow",1,1,255,0,0)
end

function onPlayerHitHouseMarkers (markerHit)
	if markerHit == Markers then
	outputChatBox ("it' work")
	end
end
addEventHandler ("onPlayerMarkerHit",getRootElement(),onPlayerHitHouseMarkers)

the markers are showing but the problem is in the function onPlayerHitHouseMarkers

 

also i'm trying so hard to learn the  Lua Language  but it's so difficult for me any tips where i can start, ( i'm seeing the website Lua.org right now )

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