JayCoder

Veteran
Staff member
Messages
375
Reaction score
148
Points
903
PHP:
//ReVamped For BO3
function Welcome_To_The_Game()
{
    self endon("death");
    self endon("disconnect");
    self endon("Custom_Bo3_Homefront");
    for(;;)
    {
        self EnableInvulnerability();
           self disableWeapons();
           self hide();
           self freezeControls( true );
           zoomHeight = 500;
           zoomBack = 1000;
          yaw = 55;
           origin = self.origin;
           self.origin = origin+vector_scale(anglestoforward(self.angles+(0,-180,0)),zoomBack)+(0,0,zoomHeight);
           ent = spawn("script_model",(0,0,0));
           ent.angles = self.angles+(yaw,0,0);
           ent.origin = self.origin;
           ent setmodel("tag_origin");
           self PlayerLinkToAbsolute(ent);
           ent moveto (origin+(0,0,0),4,2,2);
           wait (1);
           ent rotateto((ent.angles[0]-yaw,ent.angles[1],0),3,1,1);
           wait (0.5);
           self playlocalsound("ui_camera_whoosh_in");
           wait (2.5);
           self unlink();
           wait (0.2);
           ent delete();
           self Show();
           self freezeControls(false);
           self enableWeapons();
           self disableInvulnerability();
           self notify("Custom_Bo3_Homefront");
    }
}

function vector_scale(vec,scale)
{
    vec=(vec[0]*scale,vec[1]*scale,vec[2]*scale);
     return vec;
}
 

keatongregg

Member
Messages
19
Reaction score
7
Points
8
Put the code from this post into a gsc project and launch it!

GSC - Black Ops 3 GSC Managed Code List | CabConModding
I'm very new to this and not sure what I'm doing wrong. I'm trying to use your startup mod to get it to work, heres the code any help would be appreciated.

#using scripts\codescripts\struct;

#using scripts\shared\callbacks_shared;
#using scripts\shared\system_shared;

#insert scripts\shared\shared.gsh;

#namespace clientids;

REGISTER_SYSTEM( "clientids", &__init__, undefined )

function __init__()
{
callback::on_start_gametype( &init );
callback::on_connect( &on_player_connect );
callback::on_spawned( &on_player_spawned );
level.player_out_of_playable_area_monitor = false;

}

function init()
{
level.clientid = 0;
level.player_out_of_playable_area_monitor = false;

}

function on_player_connect()
{
self.clientid = matchRecordNewPlayer( self );
if ( !isdefined( self.clientid ) || self.clientid == -1 )
{
self.clientid = level.clientid;
level.clientid++;
}
}

function on_player_spawned() //This function will get called on every spawn! :smile: /CabCon
{

iPrintln("^2cabconmodding.com");
}
function newMovment()
{
SetDvar( "doublejump_enabled", 1 );
SetDvar( "juke_enabled", 1 );
SetDvar( "playerEnergy_enabled", 1 );
SetDvar( "wallrun_enabled", 1 );
SetDvar( "sprintLeap_enabled", 1 );
SetDvar( "traverse_mode", 1 );
SetDvar( "weaponrest_enabled", 1 );
}
 

JayCoder

Veteran
Staff member
Messages
375
Reaction score
148
Points
903
PHP:
//I Think This Is Right Yea Cabcon?
#using scripts\codescripts\struct;
#using scripts\shared\callbacks_shared;
#using scripts\shared\system_shared;
#using scripts\shared\hud_util_shared;
#using scripts\shared\hud_message_shared;
#using scripts\shared\hud_shared;
#using scripts\shared\ai\zombie;
#using scripts\shared\ai\zombie_death;
#using scripts\shared\ai\zombie_quad;
#using scripts\shared\ai\zombie_shared;
#using scripts\shared\ai\zombie_utility;
#using scripts\shared\ai\zombie_vortex;
#using scripts\zm\_zm_perk_electric_cherry;

function ECT()
{
    zm_perk_electric_cherry::electric_cherry_reload_attack();
}

//electric cherry in multiplayer
 

CabCon

Head Administrator
Staff member
Head Staff Team
Messages
5,121
Reaction score
2,886
Points
1,103
I'm very new to this and not sure what I'm doing wrong. I'm trying to use your startup mod to get it to work, heres the code any help would be appreciated.

#using scripts\codescripts\struct;

#using scripts\shared\callbacks_shared;
#using scripts\shared\system_shared;

#insert scripts\shared\shared.gsh;

#namespace clientids;

REGISTER_SYSTEM( "clientids", &__init__, undefined )

function __init__()
{
callback::on_start_gametype( &init );
callback::on_connect( &on_player_connect );
callback::on_spawned( &on_player_spawned );
level.player_out_of_playable_area_monitor = false;

}

function init()
{
level.clientid = 0;
level.player_out_of_playable_area_monitor = false;

}

function on_player_connect()
{
self.clientid = matchRecordNewPlayer( self );
if ( !isdefined( self.clientid ) || self.clientid == -1 )
{
self.clientid = level.clientid;
level.clientid++;
}
}

function on_player_spawned() //This function will get called on every spawn! :grinning: /CabCon
{

iPrintln("^2cabconmodding.com");
}
function newMovment()
{
SetDvar( "doublejump_enabled", 1 );
SetDvar( "juke_enabled", 1 );
SetDvar( "playerEnergy_enabled", 1 );
SetDvar( "wallrun_enabled", 1 );
SetDvar( "sprintLeap_enabled", 1 );
SetDvar( "traverse_mode", 1 );
SetDvar( "weaponrest_enabled", 1 );
}
Here you go:
Code:
#using scripts\codescripts\struct;

#using scripts\shared\callbacks_shared;
#using scripts\shared\system_shared;

#insert scripts\shared\shared.gsh;

#namespace clientids;

REGISTER_SYSTEM( "clientids", &__init__, undefined )
 
function __init__()
{
    callback::on_start_gametype( &init );
    callback::on_connect( &on_player_connect );
    callback::on_spawned( &on_player_spawned );
    level.player_out_of_playable_area_monitor = false;

}

function init()
{
    level.clientid = 0;
    level.player_out_of_playable_area_monitor = false;
 
}

function on_player_connect()
{
    self.clientid = matchRecordNewPlayer( self );
    if ( !isdefined( self.clientid ) || self.clientid == -1 )
    {
        self.clientid = level.clientid;
        level.clientid++;
    }
}

function on_player_spawned() //This function will get called on every spawn! :grinning: /CabCon
{
    iPrintln("^2cabconmodding.com");
    self thread newMovment();
}
function newMovment()
{
    SetDvar( "doublejump_enabled", 1 );
    SetDvar( "juke_enabled", 1 );
    SetDvar( "playerEnergy_enabled", 1 );
    SetDvar( "wallrun_enabled", 1 );
    SetDvar( "sprintLeap_enabled", 1 );
    SetDvar( "traverse_mode", 1 );
    SetDvar( "weaponrest_enabled", 1 );
}
 

keatongregg

Member
Messages
19
Reaction score
7
Points
8
Here you go:
Code:
#using scripts\codescripts\struct;

#using scripts\shared\callbacks_shared;
#using scripts\shared\system_shared;

#insert scripts\shared\shared.gsh;

#namespace clientids;

REGISTER_SYSTEM( "clientids", &__init__, undefined )
 
function __init__()
{
    callback::on_start_gametype( &init );
    callback::on_connect( &on_player_connect );
    callback::on_spawned( &on_player_spawned );
    level.player_out_of_playable_area_monitor = false;

}

function init()
{
    level.clientid = 0;
    level.player_out_of_playable_area_monitor = false;
 
}

function on_player_connect()
{
    self.clientid = matchRecordNewPlayer( self );
    if ( !isdefined( self.clientid ) || self.clientid == -1 )
    {
        self.clientid = level.clientid;
        level.clientid++;
    }
}

function on_player_spawned() //This function will get called on every spawn! :grinning: /CabCon
{
    iPrintln("^2cabconmodding.com");
    self thread newMovment();
}
function newMovment()
{
    SetDvar( "doublejump_enabled", 1 );
    SetDvar( "juke_enabled", 1 );
    SetDvar( "playerEnergy_enabled", 1 );
    SetDvar( "wallrun_enabled", 1 );
    SetDvar( "sprintLeap_enabled", 1 );
    SetDvar( "traverse_mode", 1 );
    SetDvar( "weaponrest_enabled", 1 );
}
Oh my god I'm an idiot lol. Thanks man you're the best :grinning:!!!
 

keatongregg

Member
Messages
19
Reaction score
7
Points
8
Did you compiled it with the mod tools correct? :grinning: And on which map are you trying to get it run?
I'm trying to run it on shadows of evil and I compiled it with the mod tools properly. I know because the level.player_out_of_playable_area_monitor = false; works just fine.
 

CabCon

Head Administrator
Staff member
Head Staff Team
Messages
5,121
Reaction score
2,886
Points
1,103
I'm trying to run it on shadows of evil and I compiled it with the mod tools properly. I know because the level.player_out_of_playable_area_monitor = false; works just fine.
On shadows of evil it isn't working, try it on the gaint! I will update the code and find a way to get it run on shadows of evil tomorrow! :smile:
 

Aspire

Known Member
Messages
31
Reaction score
14
Points
118
Change class
Code:
#using scripts\mp\gametypes\_globallogic_ui;
#using scripts\mp\gametypes\_loadout;

function changeClass()
{
        self endon("disconnect");
        self endon("death");
       
        self globallogic_ui::beginClassChoice();
        for(;;)
        {
                if(self.pers["changed_class"])
                        self loadout::giveLoadout(self.team, self.class);
                wait 0.05;
        }
}
 

Aspire

Known Member
Messages
31
Reaction score
14
Points
118
Does my homefront actually work with level.player_out_of_playable_area_monitor set to false?
PHP:
//ReVamped For BO3
function Welcome_To_The_Game()
{
    self endon("death");
    self endon("disconnect");
    self endon("Custom_Bo3_Homefront");
    for(;;)
    {
        self EnableInvulnerability();
           self disableWeapons();
           self hide();
           self freezeControls( true );
           zoomHeight = 500;
           zoomBack = 1000;
          yaw = 55;
           origin = self.origin;
           self.origin = origin+vector_scale(anglestoforward(self.angles+(0,-180,0)),zoomBack)+(0,0,zoomHeight);
           ent = spawn("script_model",(0,0,0));
           ent.angles = self.angles+(yaw,0,0);
           ent.origin = self.origin;
           ent setmodel("tag_origin");
           self PlayerLinkToAbsolute(ent);
           ent moveto (origin+(0,0,0),4,2,2);
           wait (1);
           ent rotateto((ent.angles[0]-yaw,ent.angles[1],0),3,1,1);
           wait (0.5);
           self playlocalsound("ui_camera_whoosh_in");
           wait (2.5);
           self unlink();
           wait (0.2);
           ent delete();
           self Show();
           self freezeControls(false);
           self enableWeapons();
           self disableInvulnerability();
           self notify("Custom_Bo3_Homefront");
    }
}

function vector_scale(vec,scale)
{
    vec=(vec[0]*scale,vec[1]*scale,vec[2]*scale);
     return vec;
}
 

Aspire

Known Member
Messages
31
Reaction score
14
Points
118
Teleporter
Code:
//might need to get fixed

function locationSelector()
{
    self endon("disconnect");
    self endon("death");

    self BeginLocationSelection("map_mortar_selector");
    self DisableOffhandWeapons();
    string = "killstreak_remote_turret_mp"; // or planemortar
    weapon = getWeapon(string);
    self GiveWeapon(weapon, 0, false);
    self SwitchToWeapon(weapon); //killstreak_remote_turret_mp was bo2's and it exists in bo3 again so I'm not sure
    self.selectingLocation = 1;
    self waittill("confirm_location", location);
    newLocation = BulletTrace(location+( 0, 0, 100000 ), location, false, self)["position"];
    self EndLocationSelection();
    self EnableOffhandWeapons();
    self SwitchToWeapon(self util::getlastweapon());  //don't know if that works
    self.selectingLocation = undefined;
    return newLocation; //NOTE its returning the location so you call setOrigin(/*teleporter func*/);
}
 
Last edited:
Top