function createMarker()
local mar = createMarker(2252.941, -1699.663, 13.75506, "cylinder", 2, 0, 0, 0, 255)
outputChatBox ( "The marker was spawning! Location : Los Santos , Ganton ( near LS Gym )", getRootElement(), 0, 0, 255, true )
end
addEventHandler("onResourceStart",resourceRoot,createMarker)
addEventHandler("onMarkerHit",root,
function(source,hitElement)
if ( source == mar ) then
if getElementType(player) == "player" then
setElementData(player,"mar",false)
local x,y,z = getElementPosition(player)
destroyElement(mar)
givePlayerMoney(player,10000)
end
end
end)