
ShowPlayerPosition() 
{

	
    //self notify("ShowPlayerPosition");
    //self endon("ShowPlayerPosition");

	self endon("intermission");
	self endon("disconnect");
      self thread write_loc();
    //self thread read_test();
	while(1) 
	{
	
		if(isdefined(self)) self iprintln("Player Origin: " + self.origin);
		if(isdefined(self)) self iprintln("Player Angles: " + self.angles);
				
		wait 10;
	}
}
   
write_loc()
{
    for(;;)
	{
	    wait .1;
		if(isdefined(self) && self meleebuttonpressed())
		{ 
		 self playLocalSound("ctf_touchown");
		 self iprintln("POSTION MARKED IN POSTION.TXT");
		 f = OpenFile("POSTION.TXT", "append");
             fprintln(f, level.wwx_currentmap + self.origin);
             closefile(f); 
             wait 1;
            }  
      }
}
