08.03.2016, 17:15
Use SelectObject and OnPlayerSelectObject to do what you want with the object the player clicked on instead of returning EditObject.
https://sampwiki.blast.hk/wiki/OnPlayerSelectObject
https://sampwiki.blast.hk/wiki/OnPlayerSelectObject