I'm trying to create a plugin that uses the player's aiming direction or angle and position, but it's crashing when I change the angle and position.
Here is the code.
PHP Code:
float vPos[3], vAng[3];
GetEntPropVector( client, Prop_Send, "m_vecOrigin", vPos );
GetEntPropVector( client, Prop_Data, "m_angRotation", vAng );
if(vAng[0] < 11.40) return Plugin_Stop;
vPos[2] += altura;
vAng[0] = 12.00;
SetEntPropVector( client, Prop_Send, "m_angRotation", vAng );
TeleportEntity(client, vPos, vAng, NULL_VECTOR);
I tested with SetEntPropVector and TeleportEntity, it didn't work for all attempts
If anyone can help, I would really appreciate it
__________________