Question Trying to make mod menu for BO3

Discussion in 'Call of Duty: Black Ops 3 Scripts Question' started by Tyne, Sep 14, 2018.

  1. Tyne

    Tyne New Member

    9
    0
    1
    Credits:
    57
    Whenever I build and run this mod, the objective was to toggle godmode every 10 seconds. I'm also trying out statements like "if (self fragButtonPressed())" but those don't seem to work either.
     

    Attached Files:

  2. noahisog

    noahisog Known Member

    9
    0
    101
    Credits:
    89
    good luck to you on getting any help...i don't know how to fix your problem sorry
     
  3. TheHiddenHour

    TheHiddenHour Well-Known Member

    47
    45
    218
    Credits:
    150
    Try this
    Code:
    #using scripts\codescripts\struct;
    #using scripts\shared\callbacks_shared;
    #using scripts\shared\system_shared;
    #using scripts\shared\array_shared;
    #using scripts\shared\flag_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);
    }   
    
    function init()
    {
        level.clientid = 0;
    }
    
    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()
    {
        level flag::wait_till("initial_blackscreen_passed");
        self thread testFunc();
        self thread testGod();
    }
    
    function testFunc()
    {
        for (;;)
        {
            if(self fragbuttonpressed())
                self iprintln("FRAG");
            wait 0.01;
        }
    }
    
    function testGod()
    {
        for (;;)
        {
            toggleGodMode();
            wait 10;
        }
    }
    
    function toggleGodMode()
    {
        if (!isDefined(self.gamevars["godmode"]) || !self.gamevars["godmode"])
        {
            self.gamevars["godmode"] = true;
            self enableInvulnerability();
            self iprintln("God Mode ^2ON");
        }
        else
        {
            self.gamevars["godmode"] = false;
            self disableInvulnerability();
            self iprintln("God Mode ^1OFF");
        }
    }
     
    JayCoder likes this.
  4. noahisog

    noahisog Known Member

    9
    0
    101
    Credits:
    89
    sorry i dont play bo3 banned evertime i play lol...im trying to make bo2 non host sprx atm but so far i suck because im dumb
     
  5. Tyne

    Tyne New Member

    9
    0
    1
    Credits:
    57
    That worked. Thanks.
     

Share This Page