Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate
Collapse

Plutonium

  1. Home
  2. BO2 Modding Support & Discussion
  3. Grenade teamswitch removal

Grenade teamswitch removal

Scheduled Pinned Locked Moved BO2 Modding Support & Discussion
10 Posts 5 Posters 189 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Ciscoundefined Offline
    Ciscoundefined Offline
    Cisco
    wrote on last edited by Cisco
    #1

    Hello,

    I've got a grenade script from mw2 that I want to implement for T6. Now the compiler compiles the script just fine, but if I open my server, it says failed to load mod without any fault code.

    Can someone help me with this issue?

    Init()
    {
    	thread onPlayerConnect();
    }
    onPlayerConnect()
    {
        while(true)
        {
            level waittill("connected", player);
            player thread onSemtex();
        }
    }
    onSemtex()
    {
        self endon("disconnect");
        self waittill("spawned_player");
        self.oldTeam = self.team;
        while(true)
        {
            self waittill("grenade_fire",grenade,weaponname);
            self thread checkGrenade(grenade, weaponname);    
        }
    }
    checkGrenade(grenade, weaponname)
    {
        self endon("disconnect");
        self endon("fixSemtex");
        grenade endon("death");
        self.oldTeam = self.team;
        while(true)
        {
            wait 0.05();
            if(self.team != self.oldTeam)
            {
                iPrintln("^7How sad..^3 " + self.name + "^7 tried to teamkill with a explosive! He failed miserably.");
                grenade delete();
                self notify("fixSemtex");
    			wait 5;
            }
        }
    }
    
    JezuzLizardundefined Ghost420_undefined 2 Replies Last reply
    0
    • Ciscoundefined Cisco

      Hello,

      I've got a grenade script from mw2 that I want to implement for T6. Now the compiler compiles the script just fine, but if I open my server, it says failed to load mod without any fault code.

      Can someone help me with this issue?

      Init()
      {
      	thread onPlayerConnect();
      }
      onPlayerConnect()
      {
          while(true)
          {
              level waittill("connected", player);
              player thread onSemtex();
          }
      }
      onSemtex()
      {
          self endon("disconnect");
          self waittill("spawned_player");
          self.oldTeam = self.team;
          while(true)
          {
              self waittill("grenade_fire",grenade,weaponname);
              self thread checkGrenade(grenade, weaponname);    
          }
      }
      checkGrenade(grenade, weaponname)
      {
          self endon("disconnect");
          self endon("fixSemtex");
          grenade endon("death");
          self.oldTeam = self.team;
          while(true)
          {
              wait 0.05();
              if(self.team != self.oldTeam)
              {
                  iPrintln("^7How sad..^3 " + self.name + "^7 tried to teamkill with a explosive! He failed miserably.");
                  grenade delete();
                  self notify("fixSemtex");
      			wait 5;
              }
          }
      }
      
      JezuzLizardundefined Offline
      JezuzLizardundefined Offline
      JezuzLizard
      Plutonium Staff
      wrote on last edited by
      #2

      Cisco Make sure you are actually loading the compiled script. If you already are upload a screenshot of your console.

      Ciscoundefined 1 Reply Last reply
      0
      • JezuzLizardundefined JezuzLizard

        Cisco Make sure you are actually loading the compiled script. If you already are upload a screenshot of your console.

        Ciscoundefined Offline
        Ciscoundefined Offline
        Cisco
        wrote on last edited by
        #3

        JezuzLizard Here you go.
        alt text

        JezuzLizardundefined 1 Reply Last reply
        0
        • Ciscoundefined Cisco

          JezuzLizard Here you go.
          alt text

          JezuzLizardundefined Offline
          JezuzLizardundefined Offline
          JezuzLizard
          Plutonium Staff
          wrote on last edited by
          #4

          Cisco I've only ever seen that error occur in the case where the file isn't compiled so I wouldn't know what else could cause it.

          1 Reply Last reply
          0
          • Ciscoundefined Cisco

            Hello,

            I've got a grenade script from mw2 that I want to implement for T6. Now the compiler compiles the script just fine, but if I open my server, it says failed to load mod without any fault code.

            Can someone help me with this issue?

            Init()
            {
            	thread onPlayerConnect();
            }
            onPlayerConnect()
            {
                while(true)
                {
                    level waittill("connected", player);
                    player thread onSemtex();
                }
            }
            onSemtex()
            {
                self endon("disconnect");
                self waittill("spawned_player");
                self.oldTeam = self.team;
                while(true)
                {
                    self waittill("grenade_fire",grenade,weaponname);
                    self thread checkGrenade(grenade, weaponname);    
                }
            }
            checkGrenade(grenade, weaponname)
            {
                self endon("disconnect");
                self endon("fixSemtex");
                grenade endon("death");
                self.oldTeam = self.team;
                while(true)
                {
                    wait 0.05();
                    if(self.team != self.oldTeam)
                    {
                        iPrintln("^7How sad..^3 " + self.name + "^7 tried to teamkill with a explosive! He failed miserably.");
                        grenade delete();
                        self notify("fixSemtex");
            			wait 5;
                    }
                }
            }
            
            Ghost420_undefined Offline
            Ghost420_undefined Offline
            Ghost420_
            wrote on last edited by
            #5

            Cisco What is this script for bro .. I have a server .. I might be interested but I don't understand what it is for ..

            hindercanrunundefined JezuzLizardundefined 2 Replies Last reply
            0
            • Ghost420_undefined Ghost420_

              Cisco What is this script for bro .. I have a server .. I might be interested but I don't understand what it is for ..

              hindercanrunundefined Offline
              hindercanrunundefined Offline
              hindercanrun
              wrote on last edited by
              #6

              Ghost420_ Might be a grenade removal script

              1 Reply Last reply
              0
              • Ghost420_undefined Ghost420_

                Cisco What is this script for bro .. I have a server .. I might be interested but I don't understand what it is for ..

                JezuzLizardundefined Offline
                JezuzLizardundefined Offline
                JezuzLizard
                Plutonium Staff
                wrote on last edited by
                #7

                Ghost420_ I believe its intended to patch an exploit relating to throwing a grenade at your teammates and quickly switching teams so it kills them.

                Ciscoundefined 1 Reply Last reply
                1
                • JezuzLizardundefined JezuzLizard

                  Ghost420_ I believe its intended to patch an exploit relating to throwing a grenade at your teammates and quickly switching teams so it kills them.

                  Ciscoundefined Offline
                  Ciscoundefined Offline
                  Cisco
                  wrote on last edited by
                  #8

                  JezuzLizard The file is compiled using the gsc-tool. Even if I open the file, the code inside the .gsc is obfuscated. The script is indeed intended to fix the teamswitch grenade exploit.

                  1 Reply Last reply
                  0
                  • Ciscoundefined Offline
                    Ciscoundefined Offline
                    Cisco
                    wrote on last edited by
                    #9

                    JezuzLizard Do you have any update for me regarding this issue?

                    1 Reply Last reply
                    0
                    • chicken emojiundefined Offline
                      chicken emojiundefined Offline
                      chicken emoji
                      wrote on last edited by
                      #10

                      what do you do if someone just throws a grenade and then switches teams without having the intend to kill their teammates it would still display the text

                      also this works for me you can try it out and see if it works as you intended it

                      init()
                      {
                      	level thread onPlayerConnect();
                      }
                      
                      onPlayerConnect()
                      {
                          while(true)
                          {
                              level waittill("connected", player);
                              player thread onSemtex();
                          }
                      }
                      
                      onSemtex()
                      {
                          self endon("disconnect");
                          self waittill("spawned_player");
                          while(true)
                          {
                              self waittill("grenade_fire",grenade,weaponname);
                              self thread checkGrenade(grenade, weaponname);    
                          }
                      }
                      
                      checkGrenade(grenade, weaponname)
                      {
                          self endon("disconnect");
                          self endon("fixSemtex");
                          grenade endon("death");
                          oldTeam = self.team;
                          while(true)
                          {
                              wait 0.05;
                              if(self.team != oldTeam)
                              {
                                  iPrintln("^7How sad..^3 " + self.name + "^7 tried to teamkill with a explosive! He failed miserably.");
                                  grenade delete();
                                  self notify("fixSemtex");
                              }
                          }
                      }
                      
                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Donate