You forgot to createMarker, and addEventHandler("onMarkerHit",markername,functionname) and for x,y,z use
local x,y,z = getElementPosition(player). There is end missing for function
lol stop frustating, if u don't know then just tell him that you don't know. This section is to help people not giving link to mtasa wiki. This code makes sense if you have your common sense.