Skip to content

How to Get Player's Postions And How to Teleport Players to Certain Positions. #481

Closed Answered by TitaniumLithium
TitaniumLithium asked this question in Q&A
Discussion options

You must be logged in to vote

The player controller represents the player on the server, and the player pawn represents the players physical character in the game world.

Access CCSPlayerPawn to teleport players.
To Get Players's Postions:

CCSPlayerPawn pawn = player.PlayerPawn.Get();
Console.WriteLine(pawn.AbsOrigin);

This is Abs position. (different from positions in command getpos)

To Teleport Players:

CCSPlayerPawn pawn = player.PlayerPawn.Get();
Vector Position = new Vector(X,Y,Z);
pawn.Teleport(Position);

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@YCcHxxt
Comment options

@TitaniumLithium
Comment options

Answer selected by TitaniumLithium
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants