Author Topic: teleport  (Read 3369 times)

infestor1

  • Posts: 142
  • Turrets: +6/-28
    • 345356745i624567
teleport
« on: May 10, 2009, 03:28:22 am »
How would I create a command that would teleport the target to a predefined place in the map?

It would be used like this:

!base [USER] [TEAM]

It would teleport the user ([USER]) to their team's ([TEAM]) base.

I just need to know how to teleport a player to a position, and how to make it teleport the given player.

THANKS!

doublehex

  • Posts: 1
  • Turrets: +1/-0
Re: teleport
« Reply #1 on: May 10, 2009, 05:00:35 am »
look at setviewpos command in src/game/g_cmds. c

pretty much just this line:   TeleportPlayer( ent, origin, angles );

ent is obviously the entity, origin is the x, y, z, angle is the orientation

infestor1

  • Posts: 142
  • Turrets: +6/-28
    • 345356745i624567
Re: teleport
« Reply #2 on: May 10, 2009, 10:36:41 pm »
Oh, thanks so much!

This worked well!

Thank you!