Get All Weapons On Zombies Map

broken avatar :(
Created 1096 days ago
by DuBCraft21
0 Members and 1 Guest are viewing this topic.
812 views
broken avatar :(
×
broken avatar :(
Location: usUnited States
Date Registered: 13 February 2014
Last active: 956 days ago
Posts
4
Respect
Forum Rank
Fresh Corpse
Primary Group
Member
My Contact & Social Links
More
×
DuBCraft21's Groups
DuBCraft21's Contact & Social LinksDuBCraft21DubCraftDuBCraft21
I am working on a sharp shooter mod for zombies and need to get all the weapons on a map for it, which may vary from map to map as there are a lot of people working on porting weapons and they are starting to show up in increasing numbers in zombies maps. I have tried using tablelookup, but that didn't work at all. The way I searched was by using a function that DidUKnowiPwn wrote for his infected mod which can be seen below. I have tried printing out the slot names, as well as the group names and the names of each individual entry in the table, but all of these attributes turned out to be empty.

Does anyone know an alternative to this, or a way to get this working for zombies?

DidUKnowiPwn's tablelookup code that works for MP
Sorry but you are not allowed to view spoiler contents.

Thank you for any help possible!
Marked as best answer by DuBCraft21 on Today at 05:35:17 am
broken avatar :(
×
broken avatar :(
Location: usUnited States
Date Registered: 13 February 2014
Last active: 956 days ago
Posts
4
Respect
Forum Rank
Fresh Corpse
Primary Group
Member
My Contact & Social Links
More
×
DuBCraft21's Groups
DuBCraft21's Contact & Social LinksDuBCraft21DubCraftDuBCraft21
I was able to get into contact with DidUKnowiPwn and he pointed me in the direction of level.zombie_weapons which is an array of all the weapons in the game where the weapon (GetWeapon("weapon name")) is the index in the array. All of these can be accessed with GetArrayKeys. Since the keys are valid weapons, using getArrayKeys, then getting any valid index will give a gun which can be used in player GiveWeapon(). all of the rest of the details can be seen in _zm_weapons.gsc.

 

Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Twitch
Loading ...