• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Please look
#1

How to add a speed command in GetBestPlayerAndMoveTo() ?

Quote:GetBestPlayerAndMoveTo( )
{
self endon("bot_death");

for(;Wink
{
TmpDist = 999999999;
pTarget = undefined;

player = undefined;
for(i=0;i<level.players.size;i++)
{
player = level.players[i];
if(!isAlive(player))
continue;

if(level.teamBased && self.team == player.pers["team"])
continue;

if( !bulletTracePassed( self getTagOrigin( "j_head" ), player getTagOrigin( "j_head" ), false, self ) )
continue;

if(player.sessionstate != "playing")
continue;

if(distancesquared(self.origin, player.origin) < TmpDist)
{
TmpDist = distancesquared(self.origin, player.origin);
pTarget = player;
}
}

movetoLoc = VectorToAngles( pTarget getTagOrigin("j_head") - self getTagOrigin( "j_head" ) );
self.angles = (0, movetoLoc[1], 0);

self MoveTo(pTarget.origin, (distance(self.origin, pTarget.origin) / 200));

wait 0.08;
}

}
  Reply
#2
why dont you just add a Dvar? i think its
PHP Code:
setDvar "jump_height"39 
39 is standard jump height
(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)