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

Plutonium

  1. Home
  2. BO2 Modding Support & Discussion
  3. Droppable Weapons

Droppable Weapons

Scheduled Pinned Locked Moved BO2 Modding Support & Discussion
bo2zombiesmodsideas
6 Posts 5 Posters 2.1k Views 1 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.
  • ytjusteli Offline
    ytjusteli Offline
    ytjusteli
    wrote on last edited by
    #1

    Is is possible for someone to make a weapon drop feature for bo2????
    if there's already one can you send me the link please

    A Former User? 1 Reply Last reply
    0
    • ytjusteli ytjusteli

      Is is possible for someone to make a weapon drop feature for bo2????
      if there's already one can you send me the link please

      A Former User? Offline
      A Former User? Offline
      A Former User
      wrote on last edited by
      #2

      ytjusteli

      //Put this in onPlayerSpawned()
      self thread drop_weapon();
      
      //Put this anywhere in your script
      drop_weapon()
      {
      	level endon("end_game");
      	self endon("disconnect");
      	for (;;) 
      	{
      		if (self meleebuttonpressed()) 
      		{
      			duration = 0;
      			while (self meleebuttonpressed()) 
      			{
      				duration += 1;
      				if (duration == 25) 
      				{
      					weap = self getCurrentWeapon();
      					self dropItem(weap);
      					break;
      				}
      				wait 0.05;
      			}
      		}
      		wait 0.05;
      	}
      }
      
      //Credits: Script from BOCW Mod by teh_bandit https://forum.plutonium.pw/topic/15807/release-zombies-cold-war-mod-final-update?_=1670881299406
      
      kIkl 1 Reply Last reply
      1
      • A Former User? A Former User

        ytjusteli

        //Put this in onPlayerSpawned()
        self thread drop_weapon();
        
        //Put this anywhere in your script
        drop_weapon()
        {
        	level endon("end_game");
        	self endon("disconnect");
        	for (;;) 
        	{
        		if (self meleebuttonpressed()) 
        		{
        			duration = 0;
        			while (self meleebuttonpressed()) 
        			{
        				duration += 1;
        				if (duration == 25) 
        				{
        					weap = self getCurrentWeapon();
        					self dropItem(weap);
        					break;
        				}
        				wait 0.05;
        			}
        		}
        		wait 0.05;
        	}
        }
        
        //Credits: Script from BOCW Mod by teh_bandit https://forum.plutonium.pw/topic/15807/release-zombies-cold-war-mod-final-update?_=1670881299406
        
        kIkl Offline
        kIkl Offline
        kIkl
        wrote on last edited by
        #3

        @TheGreatReaper How can i create and use this script i just can t do it

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

          Next time post in the right category.
          A question is not a release

          Basically what you need is this

          weap = self getCurrentWeapon();
          self dropItem(weap);
          

          I wrote the rest of the script to make it work
          Here's a download to the compiled file
          Once the script is loaded, holding the knife key for around 2.5s will drop your current weapon on the ground
          Instructions to load it

          Source code
          :::

          init()
          {
          	level thread onPlayerConnect();
          }
          
          onPlayerConnect()
          {
          	for (;;)
          	{
          		level waittill("connected", player);
          
          		player thread onPlayerSpawned();
          	}
          }
          
          onPlayerSpawned()
          {
          	for(;;)
              	{
          		self waittill("spawned_player");
          
          		self thread drop_weapon();
          	}
          }
          
          drop_weapon()
          {
          	level endon("end_game");
          	self endon("disconnect");
          	for (;;) 
          	{
          		if (self meleebuttonpressed()) 
          		{
          			duration = 0;
          			while (self meleebuttonpressed()) 
          			{
          				duration += 1;
          
          				if (duration == 25) 
          				{
          					weap = self getCurrentWeapon();
          					self dropItem(weap);
          					break;
          				}
          				wait 0.05;
          			}
          		}
          		wait 0.05;
          	}
          }
          
          //Credits: Script from BOCW Mod by teh_bandit https://forum.plutonium.pw/topic/15807/release-zombies-cold-war-mod-final-update?_=1670881299406
          

          :::

          1 Reply Last reply
          1
          • ytjusteli Offline
            ytjusteli Offline
            ytjusteli
            wrote on last edited by
            #5

            Resxt thx bro

            1 Reply Last reply
            0
            • Gamer4fun04 Offline
              Gamer4fun04 Offline
              Gamer4fun04
              wrote last edited by
              #6

              Anyone can send me or find me a script for BO2 version ?

              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