I don't quite get what you're trying to do. Screen coordinates are 2D vectors which describe a point on the camera/final render.
Your code however draws a gui label which shows the position of the player. It's a combination of different functions in one, so you can't just use one action in playmaker for it.
this part
function OnGUI () {
GUI.Label (Rect (10, 10, 100, 20));
}
creates a Gui label of the position/size of (10, 10, 100, 20) .
In playmaker we use the "Gui Label" function for this. The text will be a string variable which we'll put our screen coordinates in. The style should be "label" by default. Screen Rect is irrelevant since you can set the position/size below. Turn normalized off if you want to define the size/position in pixels rather than percentage (1 = 100%).
Then as for the other part
player.transform.position.ToString()
that defines the text of the label. player is a custom variable in that script, which we need to create too. Put into that player variable your player gameObject.
.transform.position
this gets the players position. So just use a "Get Position" action on the player variable. and save the position as X, Y and Z floats. (We can't convert a vector3 to string like the programmer did in that piece of code)
.ToString()
Well, that part is pretty obvious. Create 3 new string variables called "X string" "Y string" and "Z string" and use "Float To String" actions to convert the floats to their respective strings.
Now, playmaker can't use 3 different strings in one GuiLabel, so we'll combine them. Create a new string variable called "Current Position String" and use a "Build String" action to combine your X string, Y string and Z string to the Current Position String. You can use a Separator like / to make it look like 0/0/0 .
Then you just use the Current Position String as the Text on the Gui Label Action.
Now it shows your position as a gui label. To update your position frequently, mark everyFrame on the actions (GuiLabel updates automatically).
Is that what you were asking for?
To make this work as a script, just do something like this:
using UnityEngine;
using System.Collections;
public class NewBehaviourScript : MonoBehaviour {
public GameObject player;
function OnGUI () {
GUI.Label (Rect (10, 10, 100, 20), player.transform.position.ToString());
}
}
The public GameObject player should now be definable if you drag the script onto any gameObject in the scene.