Tete omar Posted August 29, 2012 Share Posted August 29, 2012 Hello guys , i made a table of marker positions below , this is 15 marker and my project is making them on 1 marker that can't be suspended .. Here's my code: bohakers = { {-1361.5, 1629.5, 1055.6999511719},{-1369.9000244141, 1635.6999511719, 1056.0999755859},{-1405, 1645.1999511719, 1071.4000244141},{-1389.9000244141, 1618.5, 1055.3000488281},{-1408.8000488281, 1589.4000244141, 1057.8000488281},{-1451, 1567.1999511719, 1059.4000244141},{-1489.6999511719, 1567, 1056.3000488281},{-1485.0999755859, 1596.3000488281, 1061.1999511719},{-1486.3000488281, 1648.1999511719, 1061.4000244141},{-1456.9000244141, 1647.9000244141, 1054.9000244141},{-1443.4000244141, 1647.6999511719, 1054.4000244141},{-1462.8000488281, 1622.1999511719, 1055.1999511719},{-1367.3000488281, 1562.5, 1060.8000488281},{-1430.8000488281, 1581.0999755859, 1055.6999511719},{-1355, 1610.9000244141, 1610.9000244141, 1054.6999511719} } local x, y, z = unpack(bohakers[1]) local bonker = createMarker(x, y, z, "cylinder", 1.50, 255, 255, 0, 180) setElementInterior( bonker, 14 ) local random = math.random(50,1000) function dirtyGoods( hitElement ) removeEventHandler("onMarkerHit", bonker, datanana) destroyElement( bonker ) givePlayerMoney( hitElement, random ) outputChatBox(random) if not i then i = 2 else i = i + 1 end if i > #bohakers then i = 1 end local x, y, z = unpack(bohakers[i]) local bonker = createMarker(x, y, z, "cylinder", 1.50, 255, 255, 0, 180) setElementInterior( bonker, 14 ) addEventHandler("onMarkerHit", bonker, datanana) end addEventHandler("onMarkerHit", bonker, dirtyGoods) debug : WARNING:8: Bad argument @ 'removeEventHandler' [Expected element at argument 2] WARNING:9: Bad argument @ 'destroyElement' [Expected element at argument 1] Link to comment
TAPL Posted August 29, 2012 Share Posted August 29, 2012 Remove local in line 15. as i was given you it was without local https://forum.multitheftauto.com/viewtopic.php?f=119&t=46763 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