PHP Code:
new ent = -1,count
while((ent = find_ent_by_class(ent, medalclass)))
{
if(owner(ent) != id) continue
new Float: playerOrigin[ 3 ];
pev( id, pev_origin, playerOrigin );
count++
playerOrigin[ 2 ] += 45.0;
if(count++ > 1) playerOrigin[ 2 ] += 85.0 // xample
// how to change origin for FIRST ent (which += 45 we set before)
engfunc( EngFunc_SetOrigin, playerBar, playerOrigin );
}
What I want If he has 2 ents I want change origin for BOTH, previous and current
PHP Code:
if(count == 1) playerOrigin[ 2 ] += 45.0;
if(count == 2)
{
// SET FIRST ENT TO
playerOrigin[ 1 ] -= 20.0;
playerOrigin[ 2 ] += 45.0;
// SET SECOND ENT TO
playerOrigin[ 1 ] += 20.0;
playerOrigin[ 2 ] += 45.0;
}
its stupid to find first ent id again after loop end ......
__________________
VDS in Europe 1 gb/s unmetered.Any configurations.
I accept Paypal, Moneybookers,etc