Would have edited my other post to include this, but seems the option isn't available.
I have the following code:
function objSelect ( button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedElement )
if clickedElement and getElementType( clickedElement ) == "spawnpoint" then
outputChatBox("--element clicked")
end
end
addEventHandler ( "onClientClick", getRootElement( ), objSelect)
What this is supposed to do, basically, is output "--element clicked" in the chatbox whenever you click an element with the type of "spawnpoint"
This works great when I change the second line to say "object" instead of "spawnpoint", however with spawnpoint it doesn't work.
Is this just a problem in MTA? or is something wrong with the code? As far as I know spawnpoints still have collisions, so therefore can be detected by clicking on them with the cursor.