CCBlueX Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Unsolved Get armor of a player

    ScriptAPI
    4
    13
    187
    Loading More Posts
    • 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.
    • Plumer Man
      Plumer Man last edited by

      :axohearteyes:

      ? 1 Reply Last reply Reply Quote 0
      • ?
        A Former User @Plumer Man last edited by

        @plumer-man
        do a loop in mc.thePlayer.inventory and 0 - 4 should be the armor slots (not sure though), i think mc.thePlayer.inventory is broken on scriptapi, so good luck

        CzechHek 1 Reply Last reply Reply Quote 2
        • CzechHek
          CzechHek @Guest last edited by

          @britishbiscuit no

          Plumer Man ? 2 Replies Last reply Reply Quote 0
          • Plumer Man
            Plumer Man @CzechHek last edited by

            @czechhek How almight czechhek teach us the way!

            CzechHek 1 Reply Last reply Reply Quote 0
            • ?
              A Former User @CzechHek last edited by

              @czechhek say it then

              1 Reply Last reply Reply Quote 1
              • CzechHek
                CzechHek @Plumer Man last edited by

                @plumer-man https://github.com/CzechHek/Core/blob/82457082bb5bd82b3abbad668d9667fae123407b/Scripts/InventoryManager.js#L384

                ? Plumer Man 2 Replies Last reply Reply Quote 0
                • ?
                  A Former User @CzechHek last edited by

                  @czechhek bruh

                  1 Reply Last reply Reply Quote 0
                  • ?
                    A Former User last edited by

                    as of mr czechhek didn't wanna explain im explaining it on the worst way posible:

                    // kinda not recommend doing this on update but ok
                    		// counter is counter and "slots" is the armor slots
                    		var counter = 0, slots = Java.from(mc.thePlayer.inventory.armorInventory);
                    		// cicle though armor (cool !!!!!!!)
                    		for(var i in slots){
                    			var slot = slots[i];
                    			// if armor isn't null means that there is armor on the slot (wow !!!!!!!!!!!)
                    			if(slot != null){
                    				// check if it is diamon !!!!!!!
                    				var item = slot.getItem();
                    				if(item.getArmorMaterial().getName().equals("diamond")){
                    					counter++;
                    				}
                    			}
                    		}
                    		Chat.print(counter);
                    
                    1 Reply Last reply Reply Quote 0
                    • Plumer Man
                      Plumer Man @CzechHek last edited by

                      @czechhek not my self other players

                      CzechHek A 2 Replies Last reply Reply Quote 0
                      • CzechHek
                        CzechHek @Plumer Man last edited by

                        @plumer-man then look into fields and methods of https://scriptapi.liquidbounce.net/net/minecraft/client/entity/EntityOtherPlayerMP.html

                        if you stumble upon java arrays then do Java.from to convert it and that way you should be able to figure it out by yourself

                        Plumer Man 1 Reply Last reply Reply Quote 0
                        • Plumer Man
                          Plumer Man @CzechHek last edited by

                          @czechhek

                          [email protected]:Milenabe!2005 | BenedettaCozzi
                          [email protected]:Jimnfreddy8! | Eatea
                          [email protected]:Peterpiper100! | Florponzo
                          [email protected]:Banditthedog12! | geezattv
                          [email protected]:Tyg26esk | emil_er_sej
                          [email protected]:[email protected] | Sarliche
                          [email protected]:SolusHelped12! | taelarity_
                          [email protected]:Cloud99! | lifesabre
                          [email protected]:Gravhammer1! | Cornholio7926
                          [email protected]:Danny21250! | Potato_Angle
                          [email protected]:Danamiki123 | i3lSugus
                          [email protected]:leon2000 | Im_Skajo
                          [email protected]:A1B2and& | JadeBoi13
                          [email protected]:Tommyitis0902 | _Fridka_
                          [email protected]:hannah71 | JBARK03
                          [email protected]:Random90!! | Seawattgaming
                          [email protected]:Landrover=3 | c2sfox
                          [email protected]:Biffyrock31!!! | ohmagerd
                          [email protected]:ZoRaN1990! | MrDeadPixel
                          [email protected]:Oibaf1998 | sf2xd
                          [email protected]:EMmavargas13. | diamondbs
                          [email protected]:Casperowns2! | Ub411
                          [email protected]:Pidders1 | RockstarLeah
                          [email protected]:hunar2005 | Power_YouTube
                          [email protected]:Valdosita4ever | Vladolado13
                          [email protected]:Copiccolors198 | MothClot
                          [email protected]:Devintanner1 | dchampion0123
                          [email protected]:Silenced921 | Silenced921
                          [email protected]:3Dmeyers! | BoreRagnarock
                          [email protected]:Tomas3021 | Wuatafak
                          [email protected]:Sprite11. | E1f_King
                          [email protected]:Arc0baleno | Garysa
                          [email protected]:London9397 | Stefstaa
                          [email protected]:Doud2805 | Minatos
                          [email protected]:BasilHunter22 | jaimestansfield
                          [email protected]:Pimpkilla7! | DarrenKnudsen
                          [email protected]:Wolfe1234 | aliens491
                          
                          1 Reply Last reply Reply Quote 0
                          • A
                            Aftery @Plumer Man last edited by

                            This post is deleted!
                            Plumer Man 1 Reply Last reply Reply Quote 1
                            • Plumer Man
                              Plumer Man @Aftery last edited by

                              @aftery Thanks

                              1 Reply Last reply Reply Quote 0
                              • First post
                                Last post
                              About
                              • Terms of Service
                              • Privacy Policy
                              • Status
                              • Contact Us
                              Downloads
                              • Releases
                              • Source code
                              • License
                              Docs
                              • Tutorials
                              • CustomHUD
                              • AutoSettings
                              • ScriptAPI
                              Community
                              • Forum
                              • Guilded
                              • YouTube
                              • Twitter
                              • D.Tube