21.12.2012, 05:11
Just to tell you where you went wrong.
You have mixed up 'playerid' and 'id', the correct code is:
id (target) = Player you are trying to teleport.
playerid (you) = Your player
pawn Код:
SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(id));
SetPlayerInterior(playerid, GetPlayerInterior(id));
GetPlayerPos(id, Pos[0], Pos[1], Pos[2]);
GetPlayerFacingAngle(id, Pos[3]);
SetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
SetPlayerFacingAngle(playerid, Pos[3]);
pawn Код:
SetPlayerVirtualWorld(id, GetPlayerVirtualWorld(playerid)); //Set target to your vw, not your vw to the target's
SetPlayerInterior(id, GetPlayerInterior(playerid)); //Set target to your interior, not your interior to the target's
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]); //Get your position
GetPlayerFacingAngle(playerid, Pos[3]); //Get your angle
SetPlayerPos(id, Pos[0], Pos[1], Pos[2]); //Set the target to this position
SetPlayerFacingAngle(id, Pos[3]); //Set the target to this angle
playerid (you) = Your player