Quote:
Originally Posted by Death Commando
The only problem is, when someone uses it, the flames shoot out the back of every player, not just you. I have been unable to fix the problem, so if anyone knows how to make effects work only on the user, i would appreciate the help.
|
PHP Code:
for(new i = 1; i <= g_iMaxClients; i++)
{
if(g_bJetpacks[i])
{
if(!IsAlive(i)) StopJetpack(i);
else AddVelocity(i, GetConVarFloat(sm_jetpack_speed));
for (new iClient = 1; iClient <= MaxClients; iClient++)
{
// Attach particle
That looks like the issue to me. You're attaching the particle to all players for each player that is jetpacking.
Also...what's with the g_iMaxClients thing? It's not needed, at all (especially due to the fact that GetMaxClients is
to be deprecated eventually) just use MaxClients like your for-loop-within-a-for-loop uses.
__________________