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

Plutonium

  1. Home
  2. BO2 Modding Support & Discussion
  3. If i want to start a trickshot server how do I add barrel stuff protection and other features that are on other trickshot servers

If i want to start a trickshot server how do I add barrel stuff protection and other features that are on other trickshot servers

Scheduled Pinned Locked Moved BO2 Modding Support & Discussion
10 Posts 6 Posters 706 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Kajuizundefined Offline
    Kajuizundefined Offline
    Kajuiz
    wrote on last edited by
    #1

    If i want to start a trickshot server how do I add barrel stuff protection and other features that are on other trickshot servers

    1 Reply Last reply
    0
    • mikzyundefined Offline
      mikzyundefined Offline
      mikzy Banned
      wrote on last edited by
      #2

      I used to be like this a year ago, so I'd feel bad if I didn't help out.
      But if I help you out, please learn GSC. It's nice to know and I learned it over the course of 2020 and I can type it away like it's nothing now.

      This works for the DSR50, and if you are not on last and you are close, it will do damage. But if you are on last and you are close, it won't do damage.

      Add this to init()

      level.playerDamageStub = level.callbackplayerdamage;
      level.callbackplayerdamage = ::Callback_PlayerDamageHook;
      

      Add this function anywhere in your code:

      Callback_PlayerDamageHook( einflictor, eattacker, idamage, idflags, smeansofdeath, sweapon, vpoint, vdir, shitloc, timeoffset, boneindex) {
       
          IsClose = Distance( self.origin, eattacker.origin ) < 400; // barrel stuff
          OnLast = (level.scorelimit - attacker.pers["kills"]) == 1;
       
          if( smeansofdeath != "MOD_TRIGGER_HURT" && smeansofdeath != "MOD_FALLING" && smeansofdeath != "MOD_SUICIDE" ) {
              if( IsSubStr( sweapon, "dsr50" ) && IsClose ) {
                  if (OnLast)
                      idamage = 0;
                  else
                      idamage = 10000000;
              else
                  idamage = 0;
          }
      
          [[level.playerDamageStub]]( einflictor, eattacker, idamage, idflags, smeansofdeath, sweapon, vpoint, vdir, shitloc, timeoffset, boneindex );
      }
      
      Kajuizundefined 1 Reply Last reply
      0
      • Kajuizundefined Offline
        Kajuizundefined Offline
        Kajuiz
        replied to mikzy on last edited by
        #3

        mikey Thanks so much means alot

        1 Reply Last reply
        0
        • Sorexundefined Offline
          Sorexundefined Offline
          Sorex Contributor
          wrote on last edited by
          #4

          Kajuiz
          if you care just about sniper don't use IsSubStr just use GetWeaponClass( sWeapon ), will work with all snipers

          Callback_PlayerDamageHook( einflictor, eattacker, idamage, idflags, smeansofdeath, sweapon, vpoint, vdir, shitloc, timeoffset, boneindex) {
           
              IsClose = Distance( self.origin, eattacker.origin ) < 400; // barrel stuff
              OnLast = (level.scorelimit - attacker.pers["kills"]) == 1;
           
              if( smeansofdeath != "MOD_TRIGGER_HURT" && smeansofdeath != "MOD_FALLING" && smeansofdeath != "MOD_SUICIDE" ) {
                  if(  !IsClose && GetWeaponClass( sweapon ) == "weapon_sniper" ) {
                      if (OnLast)
                          idamage = 0;
                      else
                          idamage = 9999; 
                  else
                      idamage = 0;
              }
          
              [[level.playerDamageStub]]( einflictor, eattacker, idamage, idflags, smeansofdeath, sweapon, vpoint, vdir, shitloc, timeoffset, boneindex );
          }
          
          mikzyundefined 1 Reply Last reply
          0
          • mikzyundefined Offline
            mikzyundefined Offline
            mikzy Banned
            replied to Sorex on last edited by
            #5

            Sorex i used to do this but I changed my way of doing it to do stuff with specific weapons, like altering a XPR or SVU spraying.

            1 Reply Last reply
            0
            • Sorexundefined Offline
              Sorexundefined Offline
              Sorex Contributor
              wrote on last edited by
              #6

              mikey No XPR and SVU spraying damage can be a good solution. Is easy to make. I have to implement it on my servers. But is not to hard to make.
              XPR and SVU are cool snipers for trickshot i like it

              Spamyundefined 1 Reply Last reply
              0
              • FSN Skulyundefined Offline
                FSN Skulyundefined Offline
                FSN Skuly
                wrote on last edited by
                #7

                hey im reading this as I want to start a trickshotting server, but I don't know where to put all of the scripts ect. Is it okay if somebody could hop on a discord call with me and help me please?

                1 Reply Last reply
                1
                • Spamyundefined Offline
                  Spamyundefined Offline
                  Spamy
                  replied to Sorex on last edited by
                  #8
                  This post is deleted!
                  1 Reply Last reply
                  0
                  • Sorexundefined Offline
                    Sorexundefined Offline
                    Sorex Contributor
                    wrote on last edited by
                    #9

                    @Mix-Spam Feel free to tag DoktorSAS on public mod chat before sending dm.
                    Do your question is related to this topic? If yes ask here under the post if it is related. If not open a new thread or tag me on public modding chats.

                    1 Reply Last reply
                    0
                    • Resxtundefined Offline
                      Resxtundefined Offline
                      Resxt Plutonium Staff
                      wrote on last edited by
                      #10

                      @Mix-Spam don't use topics for unrelated topics, even more when it's 2 years old

                      1 Reply Last reply
                      1
                      • Resxtundefined Resxt locked this topic on

                      • Login

                      • Don't have an account? Register

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