Skip to content
  • 0 Unread 0
  • 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 1.0k 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.
  • Cisco Offline
    Cisco 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;
            }
        }
    }
    
    JezuzLizard Ghost420_ 2 Replies Last reply
    0
    • Cisco 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;
              }
          }
      }
      
      JezuzLizard Offline
      JezuzLizard 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.

      Cisco 1 Reply Last reply
      0
      • JezuzLizard JezuzLizard

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

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

        JezuzLizard Here you go.
        alt text

        JezuzLizard 1 Reply Last reply
        0
        • Cisco Cisco

          JezuzLizard Here you go.
          alt text

          JezuzLizard Offline
          JezuzLizard 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
          • Cisco 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_ Offline
            Ghost420_ 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 ..

            hindercanrun JezuzLizard 2 Replies Last reply
            0
            • Ghost420_ 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 ..

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

              Ghost420_ Might be a grenade removal script

              1 Reply Last reply
              0
              • Ghost420_ 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 ..

                JezuzLizard Offline
                JezuzLizard 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.

                Cisco 1 Reply Last reply
                1
                • JezuzLizard 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.

                  Cisco Offline
                  Cisco 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
                  • Cisco Offline
                    Cisco 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 emoji Offline
                      chicken emoji 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

                      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                      With your input, this post could be even better 💗

                      Register Login
                      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
                      • Unread 0
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Donate