08-19-2013, 20:50
(This post was last modified: 08-19-2013, 21:29 by DidUknowiPwn.)
This is just a code that I decided to release as @Yamato made a base for the AIZombies mod that I asked of him but since then it's been completely rewritten.
Bugs:
* If the player reloads and sprints at the same time they'll have a short speed boost.
* The speed scalers are kinda off for the weapon class.
Riotshield is considered a "rifle" for some fucking retarded reason. (As well as the Machine Pistols....)
If anyone could fix the reload + sprint glitch that would be fantastic....
Code:
setStalker()
{
self endon("death");
self endon("disconnect");
while( 1 )
{
if( self playerADS() > 1 )
{
switch( WeaponClass(self getCurrentWeapon()) )
{
// Assault
case "rifle":
if( self getCurrentWeapon() != "riotshield_mp" )
{
self.moveSpeedScaler = 2.2;
self maps\mp\gametypes\_weapons::updateMoveSpeedScale( "primary" );
}
break;
// SMG
case "smg":
if( !isSubStr(self getCurrentWeapon(), "akimbo") )
{
self.moveSpeedScaler = 1.3;
self maps\mp\gametypes\_weapons::updateMoveSpeedScale( "primary" );
}
break;
// LMG
case "mg":
self.moveSpeedScaler = 2;
self maps\mp\gametypes\_weapons::updateMoveSpeedScale( "primary" );
break;
// Sniper
case "sniper":
self.moveSpeedScaler = 1.2;
self maps\mp\gametypes\_weapons::updateMoveSpeedScale( "primary" );
break;
// Pistol
case "pistol":
if( !isSubStr(self getCurrentWeapon(), "akimbo") )
{
self.moveSpeedScaler = 1.3;
self maps\mp\gametypes\_weapons::updateMoveSpeedScale( "secondary" );
}
break;
// Shotgun
case "spread":
if( !isSubStr(self getCurrentWeapon(), "akimbo") )
{
self.moveSpeedScaler = 1.3;
self maps\mp\gametypes\_weapons::updateMoveSpeedScale( "secondary" );
}
break;
// Launcher
case "rocketlauncher":
self.moveSpeedScaler = 2;
self maps\mp\gametypes\_weapons::updateMoveSpeedScale( "secondary" );
break;
//Other?
case "other":
self resetStalker();
break;
}
}
else
{
self resetStalker();
}
wait(0.001);
}
}
resetStalker()
{
self.moveSpeedScaler = 1;
self maps\mp\gametypes\_weapons::updateMoveSpeedScale( "primary" );
self maps\mp\gametypes\_weapons::updateMoveSpeedScale( "secondary" );
}
* If the player reloads and sprints at the same time they'll have a short speed boost.
* The speed scalers are kinda off for the weapon class.
Riotshield is considered a "rifle" for some fucking retarded reason. (As well as the Machine Pistols....)
If anyone could fix the reload + sprint glitch that would be fantastic....
Do not take life too seriously. You will never get out of it alive.