

Login Issues
Forgot password?Activate Issues
Account activation email not received? Wrong account activation email used?Other Problems?
Contact Support - Help Center Get help on the UGX Discord. Join it now!function load_weapon_spec_from_table( table, first_row )
{
gametype = GetDvarString( "ui_gametype" );
index = 1;
row = TableLookupRow( table, index );
while ( isdefined( row ) )
{
//Get this weapons data from the current tablerow
weapon_name = checkStringValid( row[ WEAPON_TABLE_COL_NAME ] );
upgrade_name = checkStringValid( row[ WEAPON_TABLE_COL_UPGRADE_NAME ] );
hint = checkStringValid( row[ WEAPON_TABLE_COL_HINT ] );
cost = int( row[ WEAPON_TABLE_COL_COST ] );
weaponVO = checkStringValid( row[ WEAPON_TABLE_COL_VO ] );
weaponVOresp = checkStringValid( row[ WEAPON_TABLE_COL_VO_RESPOND ] );
ammo_cost = undefined; // if unspecified, default to half the cost using undefined
if ( "" != row[WEAPON_TABLE_COL_AMMO_COST] )
{
ammo_cost = int( row[WEAPON_TABLE_COL_AMMO_COST] );
}
create_vox = checkStringValid( row[ WEAPON_TABLE_COL_CREATE_VOX ] );
is_zcleansed = ( ToLower( row[ WEAPON_TABLE_COL_IS_ZCLEANSED ] ) == "true" );
in_box = ( ToLower( row[ WEAPON_TABLE_COL_IN_BOX ] ) == "true" );
upgrade_in_box = ( ToLower( row[ WEAPON_TABLE_COL_UPGRADE_IN_BOX ] ) == "true" );
is_limited = ( ToLower( row[ WEAPON_TABLE_COL_IS_LIMITED ] ) == "true" );
is_aat_exempt = ( ToLower( row[ WEAPON_TABLE_COL_AAT_EXEMPT ] ) == "true" );
limit = int( row[ WEAPON_TABLE_COL_LIMIT ] );
upgrade_limit = int( row[ WEAPON_TABLE_COL_UPGRADE_LIMIT ] );
content_restrict = row[ WEAPON_TABLE_COL_CONTENT_RESTRICT ];
wallbuy_autospawn = ( ToLower( row[ WEAPON_TABLE_COL_AUTOSPAWN ] ) == "true" );
weapon_class = checkStringValid( row[ WEAPON_TABLE_COL_CLASS ] );
is_wonder_weapon = ( ToLower( row[ WEAPON_TABLE_COL_IS_WONDER_WEAPON ] ) == "true" );
force_attachments = ToLower( row[ WEAPON_TABLE_COL_FORCE_ATTACHMENTS ] );
//Now use this data to include the weapon
zm_utility::include_weapon( weapon_name, in_box );
if ( isdefined( upgrade_name ) )
{
zm_utility::include_weapon( upgrade_name, upgrade_in_box );
}
add_zombie_weapon( weapon_name, upgrade_name, hint, cost, weaponVO, weaponVOresp, ammo_cost, create_vox, is_wonder_weapon, force_attachments );
if ( is_limited )
{
if ( isdefined( limit ) )
{
add_limited_weapon( weapon_name, limit );
}
if ( isdefined( upgrade_limit ) && isdefined( upgrade_name ) )
{
add_limited_weapon( upgrade_name, upgrade_limit );
}
}
if ( is_aat_exempt && isdefined( upgrade_name ) )
{
aat::register_aat_exemption( GetWeapon( upgrade_name ) );
}
/* if ( IS_TRUE( content_restrict ) )
{
add_weapon_to_content( weapon_name, content_restrict );
}*/
/*weapon = GetWeapon( weapon_name );
if ( !isdefined( level.wallbuy_autofill_weapons ) )
{
level.wallbuy_autofill_weapons = [];
level.wallbuy_autofill_weapons["all"] = [];
}
level.wallbuy_autofill_weapons["all"][weapon] = wallbuy_autospawn;
if ( weapon_class != "" )
{
if ( !isdefined( level.wallbuy_autofill_weapons[weapon_class] ) )
{
level.wallbuy_autofill_weapons[weapon_class] = [];
}
level.wallbuy_autofill_weapons[weapon_class][weapon] = weapon;
}*/
index++;
row = TableLookupRow( table, index );
}
}
stringtable,gamedata/weapons/zm/zm_levelcommon_weapons.csv