Page 1 of 1

teleport

Posted: Mon Jun 18, 2007 9:03 pm
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 !!

Posted: Tue Jun 19, 2007 6:57 pm
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).

Posted: Tue Jun 26, 2007 8:37 pm
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.