UGX-Mods 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 Facebook
Sign In with Twitch

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - DuBCraft21

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
Spoiler: click to open...
Code Snippet
Plaintext
//for this code to work you must have included scripts\shared\statstable_shared.gsh

function get_table_items( filterSlot, blackList, search ) {//ripped from DidUKnowiPwn's infected code
items = [];

for(i = 0; i < STATS_TABLE_MAX_ITEMS; i++) {
row = TableLookupRowNum( level.statsTableID, STATS_TABLE_COL_NUMBERING, i );

if ( row < 0 ) {
continue;
}

if ( isdefined( filterSlot ) ) {
slot = TableLookupColumnForRow( level.statsTableID, row, STATS_TABLE_COL_SLOT );

if ( slot != filterSlot ) {
continue;
}
}

ref = TableLookupColumnForRow( level.statsTableId, row, STATS_TABLE_COL_REFERENCE );

if(IsDefined(blackList) && array::contains(blackList, ref)) {
continue;
}

name = TableLookupIString( level.statsTableID, STATS_TABLE_COL_NUMBERING, i, STATS_TABLE_COL_NAME );

if(IsDefined(search) && search == ref) items[items.size] = name;
else items[items.size] = ref;
}

return items;
}

Thank you for any help possible!
8 years ago
Loading ...