marker = { }
function createMarkerCmd(thePlayer)
local x, y, z = getElementPosition(thePlayer)
if isElement ( marker[thePlayer] ) then
destroyElement (marker[thePlayer])
end
marker[thePlayer] = createMarker (x, y, z, "cylinder", 2, 255 , 0, 0, 255 )
outputChatBox("createMarker .. Done!!",thePlayer, 255, 0, 0, true)
end
addCommandHandler("createMarker",createMarkerCmd)
addEventHandler('onPlayerQuit', root, function()
if isElement ( marker[thePlayer] ) then
destroyElement (marker[thePlayer])
marker[thePlayer] = nil
end
end)