Works, unless I look straight up, in which the grenade is fired 0.0 degrees to my right
Code:
new Float:EyePosition[3], Float:EyeAngles[3];
new grenade = CreateEntityByName("smokegrenade_projectile");
GetClientEyePosition(client, EyePosition);
GetClientEyeAngles(client, EyeAngles);
EyeAngles[1] += 2.5;
new Float:Velocity[3]; // Determine velocity based on given speed/angle
GetAngleVectors(EyeAngles, Velocity, NULL_VECTOR, NULL_VECTOR);
ScaleVector(Velocity, 800.0);
GetVectorAngles(Velocity, EyeAngles); // This variable won't be used again so we can steal it for this operation
EyeAngles[0] += 90.0;
TeleportEntity(grenade, EyePosition, EyeAngles, Velocity);
//SetEntPropVector(grenade, Prop_Data, "m_angRotation", EyeAngles);
DispatchSpawn(grenade);
ActivateEntity(grenade);
SetEntPropEnt(grenade, Prop_Send, "m_hThrower", client);
__________________
I am available to make plugins for pay.
Discord: Eyal282#1334