View Single Post
zonbarbar
Member
Join Date: Jul 2022
Old 02-15-2024 , 00:37   Re: [L4D & L4D2] Left 4 DHooks Direct (1.143) [25-Jan-2024]
Reply With Quote #1060

float vPos[3];
float vAng[3];
float vVel[3];
float vRot[3];

GetClientEyeAngles(client, vAng);
GetClientEyePosition(client, vPos);
vPos[2] -= 5.0;

// Set velocity
GetAngleVectors(vAng, vVel, NULL_VECTOR, NULL_VECTOR);
NormalizeVector(vVel, vVel);
ScaleVector(vVel, 1000.0); // Scale to ~ 250+ for projectiles other than the Grenade Launcher

// Random spin
vRot[0] = GetRandomFloat(300.0, 500.0);
vRot[1] = GetRandomFloat(300.0, 500.0);
vRot[2] = GetRandomFloat(-500.0, 500.0);

// int entity = L4D_PipeBombPrj(client, vPos, vAng, true, vVel, vRot); // With particles
// int entity = L4D_PipeBombPrj(client, vPos, vAng, false); // Without particles
// int entity = L4D_PipeBombPrj(client, vPos, vAng, true, vVel, vRot);
int entity = L4D_MolotovPrj(client, vPos, vAng, vVel, vRot);
// int entity = L4D2_VomitJarPrj(client, vPos, vAng, vVel, vRot);
// int entity = L4D2_SpitterPrj(client, vPos, vAng, vVel, vRot);
// int entity = L4D2_GrenadeLauncherPrj(client, vPos, vAng, vVel, vRot);

L4D_RemoveEntityDelay(entity, 5.0);
// */

return Plugin_Handled;
yes i copy the test plugin code and set scale to 10000, things happen
zonbarbar is offline