GSC Black-Ops 2 Toggles

Discussion in 'Call of Duty: Black Ops 2 Scripts' started by Se7ensinsMods, Mar 27, 2018.

  1. Se7ensinsMods

    Se7ensinsMods Known Member

    1
    0
    101
    Credits:
    30
    Here a cleaner way too toggle on and off scripts
    Code:
    toggleFOV()
    {
        if(self setClientFov(105)&& self.FOV==false&& self iPrintln("Pro Mod ^2ON"))
        {
            self.FOV=true;
        }
        else if(self setClientFov(65)&& self.FOV==true&& self iPrintln("Pro Mod ^1OFF"))
        {
            self.FOV=false;
        }
    }
    doGmode()
    {
        if(self EnableInvulnerability()&& self.gmode==false&& self iprintln("GOD MODE ^2ON"))
        {
            self.maxhealth=99999999;
            self.health=self.maxhealth;
            while(self.health < self.maxhealth)
            {
                self.health=self.maxhealth;
            }
            self.gmode=true;
        }
        else if(self DisableInvulnerability()&& self.gmode==true&& self iPrintln("GOD MODE ^1OFF"))
        {
            self.maxhealth=100;
            self.gmode=false;
        }
    }
    hearallplayers()
    {
        if(self.hall==false&& self iPrintln("Hear All ^2ON"))
        {
            self.hall=true;
            hear=StrTok("EveryoneHearsEveryone,DeadChatWithDead,DeadChatWithTeam,DeadHearTeamLiving,DeadHearAllLiving",",");
            for(j=0;j < hear.size;j++)
            {
                SetMatchTalkFlag(hear[j],1);
            }
        }
        else if(self.hall==true&& self iPrintln("Hear All ^1OFF"))
        {
            self.hall=false;
            hear2=StrTok("EveryoneHearsEveryone,DeadChatWithDead,DeadChatWithTeam,DeadHearTeamLiving,DeadHearAllLiving",",");
            for(j=0;j < hear2.size;j++)
            {
                SetMatchTalkFlag(hear2[j],0);
            }
        }
    }
    Invisible()
    {
        if(self Hide()&& self.ghst==false&& self iprintln("Invisible Mode: [^2Active^7]"))
        {
            self.ghst=true;
        }
        else if(self Show()&& self.ghst==true&& self iprintln("Invisible Mode: [^1Desactive^7]"))
        {
            self.ghst=false;
        }
    }
     
  2. candy

    candy G59 Terrorist Donator

    1,242
    813
    398
    Credits:
    6,797
    If you're saying this is a cleaner way of doing toggles, no. Just no.
    I suppose you mainly went for less lines, which sure, I guess. But doesn't make it 'clean'.
     
    Last edited: Mar 28, 2018
    SlothWiiPlaza likes this.

Share This Page