# menu
 
http://www.planethalflife.com/hlprogramming > tutorials > database 

news
 
current
 
submit

tutorials
 
database
  -
mp
  -
client
 
submit
 
search

forum
 
main

contact
 
email

teleport command
Created by doketid



HalfLife's Code is BLUE
doketid's Code is RED
doketid's Commentary is GREEN

In clientcommand function of client.cpp
look for

else if ( FStrEq(pcmd, "say_team" ) )
{
Host_Say( pEntity, 1 );
}

Under it Put
///////////TELEPORT BY DOKETID/////////
else if (FStrEq(pcmd, "!teleport"))
{

Vector newOrigin;

MESSAGE_BEGIN( MSG_BROADCAST, SVC_TEMPENTITY );
WRITE_BYTE( TE_TELEPORT );

WRITE_COORD( pev->origin.x= atoi( CMD_ARGV(1)));

WRITE_COORD( pev->origin.y= atoi( CMD_ARGV(2)));

WRITE_COORD( pev->origin.z= atoi( CMD_ARGV(3)));

MESSAGE_END();


UTIL_SetOrigin(pev, newOrigin);

}
//////////////////
and thats it TelePort around the map!