teleport

Locked
cpu90
Posts: 7
Joined: Wed Nov 30, 2005 10:16 pm

teleport

Post by cpu90 »

Hi,

I'm trying to make it so that when I hit the space bar, I can teleported back to the origin. I created a .cfg file for my map that would bind SPACE to call functions of my mod. However I can't seem to figure out which variable to use/set for the player to be beamed back to the origin. please, help !!
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Post by ^misantropia^ »

You'll want to grep the cgame for calls to trap_SendClientCommand() and check out how game processes those (hint: look at ClientCommand() in game/g_cmds.c).
cpu90
Posts: 7
Joined: Wed Nov 30, 2005 10:16 pm

Post by cpu90 »

actually I found a very easy way to make teleportation:

call console command /setviewpos x y z yaw

that'll teleport you to wherever x y z and yaw is.
Locked