Quote:
Originally Posted by Kotoamatsukami
Hello. I try to write some code which will teleport user using this;
PHP Code:
public plugin_init()
{
register_clcmd("say /tp", "tp" )
}
public tp( id )
{
new origin[3]
get_user_origin( id, origin )
origin[0] += 50 // will move forward because this is X-position based on CS
set_user_origin( id, origin )
}
It does teleport successfully but it didn't teleport forward( as I wanted it to do ) and It allow player to penetrate the wall too but then I saw Arkshine's post on how to move from A to B;
But, how do I redirect the player from point A to point B? Using vector? but the tutorial use
PHP Code:
new Float:fVelocity[3]
pev( id, pev_velocity, fVelocity )
Which I don't understand what it's trying to do...
|
How do you suppose to move ALWAYS 10 units "in forward" of you by just adding 10 units to your origin? It's aligned to map coordinates, 3d dimension, learn about it, get some math books. You have to move in forward having your view direction vector
__________________