IPlayer.Teleport not working properlyFixed
I have tried this several ways, it does not appear to be working.

I even pulled the specific code out of the uMod project and pasted it directly.  No dice.

It's compiling fine on the server.

My character doesn't move at all when I call. 

When I ran a test on the actual retrieved "entity" it was returning null.  Yet, somehow IPlayer.Position works every time and pulls it's data from entity.  Not sure how that's even possible.

This is what I'm trying right now --

if ( msg == "recover" ) // TODO: Implement this
{

   // time played at time of death, minus time played thus-far in this game. (not time today, not since logged in)
   // if 10 minutes has passed, sorry no teleport.
   // above not implemented.

   // if xyz is 0,0,0 .. sorry no teleport.
   // {"RecoverFail", "Recovery command failed, the point of death was unknown!" },

   float x, y, z;

   EntityPlayer entity = Object as EntityPlayer;

// hard code for testing...

   x = -98.01f; y = 74.25f; z = 2008.01f;  // west 98, 60+14.1 up (I add a little extra), north 2008

   entity?.SetPosition(new Vector3(x, y, z));

   if (entity == null) 
   {
      NextFrame( () => ci.IPlayer.Message( "Entity is null...." ) );
   }

   ci.IPlayer.Position( out x, out y, out z ); 
   NextFrame( () => ci.IPlayer.Message( "xyz {0}, {1}, {2}", "", x, y, z ) );
}​


entity returns null every time.  Note I only pulled this in because Teleport was failing.  It's exactly the code in Teleport.

The xyz message works every time, but yet it gets it's info from "IPlayer.Position", which calls exactly the same entity.
EntityPlayer is not IPlayer, so it being null is an issue with your cast (no idea what your Object is).

Merged post

Found the issue, needed to use a different method other than SetPosition. Will be fixed in the next build.
changed it to...

float x, y, z;

x = -98.01f; y = 74.25f; z = 2008.01f;

ci.IPlayer.Teleport( x, y, z );

Same thing happening.. no teleport.  (minus the null message.. =) )

How would you code a teleport in this case?  The top part of the method --

void OnPlayerChat(ClientInfo _cInfo, string message)
{

ClientInfo ci = _cInfo;
In response to Roger1 ():
changed it to...

float x, y, z;

x = -98.01f; y = 74.25f; z = 2008.01f;
If you didn't see my previous post update, it'll be updated to another method in the next build.
TY.  I updated to v2.0.3769 and it works now.  
Locked automatically