function guiClick (button, state, absoluteX, absoluteY) 
  if (source == spawnBut) then 
    triggerServerEvent ("carSpawn", lp) 
  guiSetVisible (theWindow, false) 
  showCursor (false) 
  elseif (source == destroyBut) then 
    triggerServerEvent ("carDestroy", lp) 
  guiSetVisible (theWindow, false) 
  showCursor (false) 
  elseif (source == closeBut) then 
  guiSetVisible (theWindow, false) 
  showCursor (false) 
  end 
end 
addEventHandler ("onClientGUIClick", getRootElement(), guiClick) 
 
using that now but it doesn't get rid of cursor