Thread: Teleport entity
View Single Post
eyal282
Veteran Member
Join Date: Aug 2011
Old 11-16-2019 , 10:50   Re: Teleport entity
Reply With Quote #2

Quote:
Originally Posted by Minfas View Post
Hi,
I am trying to figure out how to teleport a entity (prop_dynamic_override) little bit to left and backwards.
PHP Code:

TeleportEntity
(entityg_fLocationg_fAnglesNULL_VECTOR); 
Adding values to g_fLocation is probably useless because its written as coordinates on the map.

Thank you for help!
GetEntPropVector(entity, Prop_Data, "m_vecOrigin", g_fLocation);

g_fLocation[0] += 24.0
g_fLocation[1] += 24.0


TeleportEntity(entity, g_fLocation, g_fAngles, NULL_VECTOR);

Mess with numbers or use negative numbers until you're good.
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline