Modme Forums

Need help trying to get this to work

Game Modding | Call of Duty: Black Ops 3 | Scripting


ModmeBot:

Thread By: Stonermagoo420

//*****************************************************************************
// MAIN
//*****************************************************************************
function main()
{
zm_usermap::main();

level._zombie_custom_add_weapons =&custom_add_weapons;

//Setup the levels Zombie Zone Volumes
level.zones = [];
level.zone_manager_init_func =&usermap_test_zone_init;
init_zones[0] = "start_zone";
level thread zm_zonemgr::manage_zones( init_zones );
level.pathdist_type = PATHDIST_ORIGINAL;
function usermap_test_zone_init()
{
level flag::init( "always_on" );
level flag::set( "always_on" );
}
function custom_add_weapons()
{
zm_weapons::load_weapon_spec_from_table("gamedata/weapons/zm/zm_levelcommon_weapons.csv", 1);
}
// Multi Jump
lands_On_Ground()
{
self endon( "disconnect" );
loopResult = true;
for(;;)
{
wait 0.05;
newResult = self isOnGround();
if(newResult != loopResult)
{
if(!loopResult && newResult)
self notify( "landedOnGround" );
loopResult = newResult;
}
}
}
onPlayerMultijump()
{
self endon( "disconnect" );
self thread landsOnGround();
if(!isDefined(self.numOfMultijumps))
self.numOfMultijumps = 2;
for(;;)
{
currentNum = 0;
while(!self jumpbuttonpressed()) wait 0.05;
while(self jumpbuttonpressed()) wait 0.05;
if(getDvarInt("jump_height") > 250)
continue;
if ( !isAlive( self ) )
{
self waittill("spawned_player");
continue;
}
if ( !self isOnGround() )
{
while( !self isOnGround() && isAlive( self ) && currentNum < self.numOfMultijumps)
{
waittillResult = self waittill_any_timeout( 0.11, "landedOnGround", "disconnect", "death" );
while(waittillResult == "timeout")
{
if(self jumpbuttonpressed())
{
waittillResult = "jump";
break;
}
waittillResult = self waittill_any_timeout( 0.05, "landedOnGround", "disconnect", "death" );
}
if(waittillResult == "jump" && !self isOnGround() && isAlive( self ))
{
playerAngles = self getplayerangles();
playerVelocity = self getVelocity();
self setvelocity( (playerVelocity[0], playerVelocity[1], playerVelocity[2]/2 ) + anglestoforward( (270, playerAngles[1], playerAngles[2]) ) * getDvarInt( "jump_height" ) * ( ( (-1/39) * getDvarInt( "jump_height" ) ) + (17/2) ) );
currentNum++;
while(self jumpbuttonpressed()) wait 0.05;
}
else
break;
}
while(!self isOnGround())
wait 0.05;
}
}
}