try this.
Code:[ChatCommand("listiinv")] private void cmdListInv(BasePlayer player, string command, string[] args) { if (player.net.connection.authLevel < 1) { return; } List<string> prefabs = new List<string>(); foreach (Item item in player.inventory.containerMain.itemList) { if (item.info.itemMods.Length > 0) { foreach (ItemMod itemMod in item.info.itemMods) { prefabs.Add(itemMod.name); } } } player.ConsoleMessage("Inventory item prefabs:"); player.ConsoleMessage(string.Join("\n", prefabs.ToArray())); SendReply(player, "Press F1 and open console"); }
ComponentBlocker
Moved
Total Downloads: 2,275 - First Release: Oct 18, 2015 - Last Update: Feb 4, 2017
- 5/5, 11 likes
-
Calytic Community Admin Community Mod
-
-
Calytic Community Admin Community Mod
Uhh, no that was a typo
-
-
Hey man im trying to remove all guns and building structures past stone from my server but have little experience coding i tried several methods listed on the main page and we tried doing Jumse (just copying and pasting it but it still is not working any chance you could list me a example to remove one of the guns and then maybe i could just copy and paste for other items.
-
Calytic Community Admin Community Mod
The easiest thing to do is to use the display name of the item
Code:/blocker "Assault Rifle"
Code:/blocker rifle.ak
Rust -
sorry if this sounds dumb man so i go into my clanforge click addons click config then click file.herejson which opens up it up to the right then i would just list like this.
1./blocker rifle.ak
2./blocker pistol.revolver
and so forth until all items i want gone are gone correct? -
Calytic Community Admin Community Mod
Running..
/blocker rifle.ak
adds the item
Running the same command again
/blocker rifle.ak
removes it from the block list -
so just use it in the console as a admin ? i did but it is still letting me spawn in aks or does it only affect players?
-
Calytic Community Admin Community Mod
-
o sweet man but only admins can do this correct?
[DOUBLEPOST=1452740226][/DOUBLEPOST]also second question now that i have this on the blocklist do they stay permanently until i remove them do i have to reenter this each wipe also the first question are admins the only one who can add/remove from blocklist -
Calytic Community Admin Community Mod
Yes, only admins have permissions to use the /blocker command
The blocklist is permanent, it will persist between wipes. -
Hey man is there a way to see whats all on the block list
-
Calytic Community Admin Community Mod
Thanks for pointing out that wasn't in the documentation. It's updated now.
The command is /blocklist -
is there a way to remove everything from the blocklist at once ? also thank you for helping me out man great mod and great help
-
Calytic Community Admin Community Mod
Calytic updated ComponentBlocker with a new update entry:
0.0.5
[DOUBLEPOST=1452826476][/DOUBLEPOST] -
Calytic Community Admin Community Mod
Calytic updated ComponentBlocker with a new update entry:
0.0.51
-
when I block pants using shortname it also blocks hide pants
-
Calytic Community Admin Community Mod
Use the /listinv command to get a more specific name for the pants you want to block. This has already been addressed in the support thread.
-
Jean pants short name is pants and that's what I used but it also blocks hide pants I'm trying to block regular jeans no hide