"player" is actually a statement (or command). It returns a reference to the players unit, regardless of it's name.
If your player is named "John" then:
vehicle john
is the same as
vehicle player
This way you don't have to keep track of the name of the player.
So "nearestObject [player, "StreetLamp"] " returns a reference to the streetlamp object that is closest to the player.
You could also write this as:
nearestObject [john, "StreetLamp"]
the whole statement:
lightIsOn nearestObject [player, "StreetLamp"] != "OFF"
checks to see if the streetlamp closest to the player is something other than "off".
You could use this whole statement in a triggers condition field, for example
That help any or did I totally screw that explanation up?