Okay how can I explain this, basically i wanted to change my map name from nazi_zombie_annihilation to just annihilation because i heard that the name cannot go over so many characters and i thought the name was too long so i changed it by running the ugx script placer and copying my map files and all the scripts over to the new map, and when i did that now when i load up the map, it gives me no weapon, i basically have to scroll on the mouse wheel to get to the colt, and i changed the colt myself and gave it a new name but it gives me the standard colt but its a lot stronger than the old one, and when i hit the box i can only have 1 weapon, i have to buy a wall weapon to get 2 weapons. Hope i explained it well enough, how can i fix it? I tried looking through all the scripts but found nothing.
Do you have the latest version of the script placer? I added a fix for this in v1.1.3, if you have it and it's not working I would appreciate if you could post your loadout.gsc file so I can see what's wrong.
Do you have the latest version of the script placer? I added a fix for this in v1.1.3, if you have it and it's not working I would appreciate if you could post your loadout.gsc file so I can see what's wrong.
Yes i do have the latest version, here is my loadout.gsc
Code Snippet
Plaintext
#include maps\_utility;
init_loadout() { // MikeD (7/30/2007): New method of precaching/giving weapons. // Set the level variables. if( !IsDefined( level.player_loadout ) ) { level.player_loadout = []; }
// CODER MOD // With the player joining later now we need to precache all weapons for the level init_models_and_variables_loadout();
players = get_players(); for ( i = 0; i < players.size; i++ ) { players[i] give_loadout(); players[i].pers["class"] = "closequarters"; } level.loadoutComplete = true; level notify("loadout complete");
// these precaches should only happen per level and campaign
set_player_viewmodel( "viewmodel_usa_marinewet_rolledup_arms"); set_player_interactive_hands( "viewmodel_usa_marinewet_rolledup_player" ); // Uncomment this if you want "interactive" hands for Banzai
level.campaign = "american"; return; } else if( IsSubStr( level.script, "intro_" ) ) // Support for the intro movies for the campaigns { return; } else if( level.script == "credits" ) { set_player_viewmodel( "viewmodel_usa_marine_arms"); set_player_interactive_hands( "viewmodel_usa_marine_player"); level.campaign = "american"; return; }
//------------------------------------ // level.script is not a single player level. give default weapons. println ("loadout.gsc: No level listing in _loadout.gsc, giving default guns!!!! =======================");
// SRS 6/29/2008: updated to allow defaulted maps to have different level.campaign default viewarms if( IsDefined( level.campaign ) && level.campaign == "russian" ) { set_player_viewmodel( "viewmodel_rus_guard_arms"); } else { set_player_viewmodel( "viewmodel_usa_marine_arms"); level.campaign = "american"; } }
// This will precache and set the loadout rather than duplicating work. add_weapon( weapon_name ) { PrecacheItem( weapon_name ); level.player_loadout[level.player_loadout.size] = weapon_name; }
// This sets the secondary offhand type when the player spawns in set_secondary_offhand( weapon_name ) { level.player_secondaryoffhand = weapon_name; }
// This sets the the switchtoweapon when the player spawns in set_switch_weapon( weapon_name ) { level.player_switchweapon = weapon_name; }
// This sets the the action slot for when the player spawns in set_action_slot( num, option1, option2 ) {
if( num < 2 || num > 4) { if(level.script != "pby_fly") // GLocke 11/15/2007 - The flying level uses all 4 dpad slots { // Not using 1, since it's defaulted to grenade launcher. assertmsg( "_loadout.gsc: set_action_slot must be set with a number greater than 1 and less than 5" ); } }
// Glocke 12/03/07 - added precaching of weapon type for action slot if(IsDefined(option1)) { if(option1 == "weapon") { PrecacheItem(option2); level.player_loadout[level.player_loadout.size] = option2; } }
// Sets the player's handmodel used for "interactive" hands and banzai attacks set_player_interactive_hands( model ) { level.player_interactive_hands = model; PrecacheModel( level.player_interactive_hands ); }
// MikeD (4/18/2008): In order to be able to throw a grenade back, the player first needs to at // least have a grenade in his inventory before doing so. So let's try to find out and give it to him // then take it away. gave_grenade = false;
// First check to see if we are giving him a grenade, if so, skip this process. for( i = 0; i < level.player_loadout.size; i++ ) { if( WeaponType( level.player_loadout[i] ) == "grenade" ) { gave_grenade = true; break; } }
// If we do not have a grenade then try to automatically assign one // If we can't automatically do this, then the scripter needs to do by hand in the level if( !gave_grenade ) { if( IsDefined( level.player_grenade ) ) { grenade = level.player_grenade; self GiveWeapon( grenade ); self SetWeaponAmmoStock( grenade, 0 ); gave_grenade = true; }
if( !gave_grenade ) { // Get all of the AI and assign any grenade to the player ai = GetAiArray( "allies" );
println( "^3LOADOUT ISSUE: Unable to give a grenade, the player need to be given a grenade and then take it away in order for the player to throw back grenades, but not have any grenades in his inventory." ); } }
for( i = 0; i < level.player_loadout.size; i++ ) { self GiveWeapon( level.player_loadout[i] ); }
if( IsDefined( level.player_switchweapon ) ) { // the wait was added to fix a revive issue with the host // for some reson the SwitchToWeapon message gets lost // this can be removed if that is ever resolved if ( isdefined(wait_for_switch_weapon) && wait_for_switch_weapon == true ) { wait(0.5); } self SwitchToWeapon( level.player_switchweapon ); }
wait(0.5);
self player_flag_set("loadout_given"); }
give_model( class ) { // switch ( level.campaign ) // { // case "russian": // self mptype\player_rus_guard::main(); // break; // case "american": // default: // self mptype\player_usa_marine::main(); // break;
switch( self.entity_num) { case 0: character\char_zomb_player_0::main(); break; case 1: character\char_zomb_player_1::main(); break; case 2: character\char_zomb_player_2::main(); break; case 3: character\char_zomb_player_3::main(); break; }
// MikeD (3/28/2008): If specified, give the player his hands if( IsDefined( level.player_viewmodel ) ) { self SetViewModel( level.player_viewmodel ); } }
/////////////////////////////////////////////// // SavePlayerWeaponStatePersistent // // Saves the player's weapons and ammo state persistently( in the game variable ) // so that it can be restored in a different map. // You can use strings for the slot: // // SavePlayerWeaponStatePersistent( "russianCampaign" ); // // Or you can just use numbers: // // SavePlayerWeaponStatePersistent( 0 ); // SavePlayerWeaponStatePersistent( 1 ); etc. // // In a different map, you can restore using RestorePlayerWeaponStatePersistent( slot ); // Make sure that you always persist the data between map changes.
SavePlayerWeaponStatePersistent( slot ) { current = level.player getCurrentWeapon(); if ( ( !isdefined( current ) ) || ( current == "none" ) ) assertmsg( "Player's current weapon is 'none' or undefined. Make sure 'disableWeapons()' has not been called on the player when trying to save weapon states." ); game[ "weaponstates" ][ slot ][ "current" ] = current;
if ( isdefined( level.legit_weapons ) ) { // weapon doesn't exist in this level if ( !isdefined( level.legit_weapons[ weapName ] ) ) continue; }
// don't carry over C4 or claymores if ( weapName == "c4" ) continue; if ( weapName == "claymore" ) continue; level.player GiveWeapon( weapName ); level.player GiveMaxAmmo( weapName );
// below is only used if we want to NOT give max ammo // level.player SetWeaponAmmoClip( weapName, game[ "weaponstates" ][ slot ][ "list" ][ weapIdx ][ "clip" ] ); // level.player SetWeaponAmmoStock( weapName, game[ "weaponstates" ][ slot ][ "list" ][ weapIdx ][ "stock" ] ); }
set_player_viewmodel( "viewmodel_usa_marinewet_rolledup_arms"); set_player_interactive_hands( "viewmodel_usa_marinewet_rolledup_player" ); // Uncomment this if you want "interactive" hands for Banzai
level.campaign = "american"; return; } else if( IsSubStr( level.script, "intro_" ) ) // Support for the intro movies for the campaigns { return; } else if( level.script == "credits" ) { set_player_viewmodel( "viewmodel_usa_marine_arms"); set_player_interactive_hands( "viewmodel_usa_marine_player"); level.campaign = "american"; return; }
//------------------------------------ // level.script is not a single player level. give default weapons. println ("loadout.gsc: No level listing in _loadout.gsc, giving default guns!!!! =======================");
// SRS 6/29/2008: updated to allow defaulted maps to have different level.campaign default viewarms if( IsDefined( level.campaign ) && level.campaign == "russian" ) { set_player_viewmodel( "viewmodel_rus_guard_arms"); } else { set_player_viewmodel( "viewmodel_usa_marine_arms"); level.campaign = "american"; } }
// This will precache and set the loadout rather than duplicating work. add_weapon( weapon_name ) { PrecacheItem( weapon_name ); level.player_loadout[level.player_loadout.size] = weapon_name; }
// This sets the secondary offhand type when the player spawns in set_secondary_offhand( weapon_name ) { level.player_secondaryoffhand = weapon_name; }
// This sets the the switchtoweapon when the player spawns in set_switch_weapon( weapon_name ) { level.player_switchweapon = weapon_name; }
// This sets the the action slot for when the player spawns in set_action_slot( num, option1, option2 ) {
if( num < 2 || num > 4) { if(level.script != "pby_fly") // GLocke 11/15/2007 - The flying level uses all 4 dpad slots { // Not using 1, since it's defaulted to grenade launcher. assertmsg( "_loadout.gsc: set_action_slot must be set with a number greater than 1 and less than 5" ); } }
// Glocke 12/03/07 - added precaching of weapon type for action slot if(IsDefined(option1)) { if(option1 == "weapon") { PrecacheItem(option2); level.player_loadout[level.player_loadout.size] = option2; } }
// Sets the player's handmodel used for "interactive" hands and banzai attacks set_player_interactive_hands( model ) { level.player_interactive_hands = model; PrecacheModel( level.player_interactive_hands ); }
// MikeD (4/18/2008): In order to be able to throw a grenade back, the player first needs to at // least have a grenade in his inventory before doing so. So let's try to find out and give it to him // then take it away. gave_grenade = false;
// First check to see if we are giving him a grenade, if so, skip this process. for( i = 0; i < level.player_loadout.size; i++ ) { if( WeaponType( level.player_loadout[i] ) == "grenade" ) { gave_grenade = true; break; } }
// If we do not have a grenade then try to automatically assign one // If we can't automatically do this, then the scripter needs to do by hand in the level if( !gave_grenade ) { if( IsDefined( level.player_grenade ) ) { grenade = level.player_grenade; self GiveWeapon( grenade ); self SetWeaponAmmoStock( grenade, 0 ); gave_grenade = true; }
if( !gave_grenade ) { // Get all of the AI and assign any grenade to the player ai = GetAiArray( "allies" );
println( "^3LOADOUT ISSUE: Unable to give a grenade, the player need to be given a grenade and then take it away in order for the player to throw back grenades, but not have any grenades in his inventory." ); } }
for( i = 0; i < level.player_loadout.size; i++ ) { self GiveWeapon( level.player_loadout[i] ); }
if( IsDefined( level.player_switchweapon ) ) { // the wait was added to fix a revive issue with the host // for some reson the SwitchToWeapon message gets lost // this can be removed if that is ever resolved if ( isdefined(wait_for_switch_weapon) && wait_for_switch_weapon == true ) { wait(0.5); } self SwitchToWeapon( level.player_switchweapon ); }
wait(0.5);
self player_flag_set("loadout_given"); }
give_model( class ) { // switch ( level.campaign ) // { // case "russian": // self mptype\player_rus_guard::main(); // break; // case "american": // default: // self mptype\player_usa_marine::main(); // break;
switch( self.entity_num) { case 0: character\char_zomb_player_0::main(); break; case 1: character\char_zomb_player_1::main(); break; case 2: character\char_zomb_player_2::main(); break; case 3: character\char_zomb_player_3::main(); break; }
// MikeD (3/28/2008): If specified, give the player his hands if( IsDefined( level.player_viewmodel ) ) { self SetViewModel( level.player_viewmodel ); } }
/////////////////////////////////////////////// // SavePlayerWeaponStatePersistent // // Saves the player's weapons and ammo state persistently( in the game variable ) // so that it can be restored in a different map. // You can use strings for the slot: // // SavePlayerWeaponStatePersistent( "russianCampaign" ); // // Or you can just use numbers: // // SavePlayerWeaponStatePersistent( 0 ); // SavePlayerWeaponStatePersistent( 1 ); etc. // // In a different map, you can restore using RestorePlayerWeaponStatePersistent( slot ); // Make sure that you always persist the data between map changes.
SavePlayerWeaponStatePersistent( slot ) { current = level.player getCurrentWeapon(); if ( ( !isdefined( current ) ) || ( current == "none" ) ) assertmsg( "Player's current weapon is 'none' or undefined. Make sure 'disableWeapons()' has not been called on the player when trying to save weapon states." ); game[ "weaponstates" ][ slot ][ "current" ] = current;
if ( isdefined( level.legit_weapons ) ) { // weapon doesn't exist in this level if ( !isdefined( level.legit_weapons[ weapName ] ) ) continue; }
// don't carry over C4 or claymores if ( weapName == "c4" ) continue; if ( weapName == "claymore" ) continue; level.player GiveWeapon( weapName ); level.player GiveMaxAmmo( weapName );
// below is only used if we want to NOT give max ammo // level.player SetWeaponAmmoClip( weapName, game[ "weaponstates" ][ slot ][ "list" ][ weapIdx ][ "clip" ] ); // level.player SetWeaponAmmoStock( weapName, game[ "weaponstates" ][ slot ][ "list" ][ weapIdx ][ "stock" ] ); }
Are you 100% sure you downloaded the latest version? Is this the loadout file from "root/mods"? That's the one I wanna see just in case you got this from "raw/maps". This file doesn't have the fix to work with non "nazi_zombie_" prefix maps.
Even if the loadout was messed up i'm somewhat sure that you'd still see weapons in the box(correct me if i'm wrong). I think that the issue is because of the weaponfiles or xmodels for your weapons not being included.
Even if the loadout was messed up i'm somewhat sure that you'd still see weapons in the box(correct me if i'm wrong). I think that the issue is because of the weaponfiles or xmodels for your weapons not being included.
You can still see weapons from the box, the problem is that once the players take the weapons it will only allow them to have 1 weapon.
Are you 100% sure you downloaded the latest version? Is this the loadout file from "root/mods"? That's the one I wanna see just in case you got this from "raw/maps". This file doesn't have the fix to work with non "nazi_zombie_" prefix maps.
Yes i am pretty sure, i will run the script placer again and see what happens
You can still see weapons from the box, the problem is that once the players take the weapons it will only allow them to have 1 weapon.
This is likely because you don't have zombie_colt. The box is programmed so unless you have that weapon it replaces the current weapon instead of giving you a new one.
Well, for the damage part of the colt is being your using the wrong weapon file. I noticed the colt you have in the gsc is just colt. Replace them with zombie_colt and the issue should be resolved with that.
Well, for the damage part of the colt is being your using the wrong weapon file. I noticed the colt you have in the gsc is just colt. Replace them with zombie_colt and the issue should be resolved with that.
The zombiemode section of the file uses "zombie_colt". Once the detection set of the code for it is working it will use "zombie_colt".
Well that fixed it but now instead of giving me my custom weapon(i updated the zombie_colt file and changed the name/damage/ammo and all that) it gives me the normal m1911, and if i type zombie_colt_upgraded(I also changed this file) it gives me an invisible gun but the name is c3000, i know it should give me my custom guns because thats the way i had it in my first map Fanatic.
Well that fixed it but now instead of giving me my custom weapon(i updated the zombie_colt file and changed the name/damage/ammo and all that) it gives me the normal m1911, and if i type zombie_colt_upgraded(I also changed this file) it gives me an invisible gun but the name is c3000, i know it should give me my custom guns because thats the way i had it in my first map Fanatic.
Did you make sure to either update the file inside the DLC3_Weapons.iwd or if you have a folder with your already existing weapons delete DLC3_Weapons.iwd?
Did you make sure to either update the file inside the DLC3_Weapons.iwd or if you have a folder with your already existing weapons delete DLC3_Weapons.iwd?
Yes i have it in my weapons/sp folder and got rid of the dlc3_weapons.iwd
For your custom weapons have you ensured you re-included all the models for your custom weapons? Otherwise they wouldn't show up. Make sure you have your weapons checked in the IWD list and double check that your custom weapons are actually there, name isn't "c3000". Once you have built I'd check your appdata/mods folder to see if the weapon files are still your custom ones.
For your custom weapons have you ensured you re-included all the models for your custom weapons? Otherwise they wouldn't show up. Make sure you have your weapons checked in the IWD list and double check that your custom weapons are actually there, name isn't "c3000". Once you have built I'd check your appdata/mods folder to see if the weapon files are still your custom ones.
I got it fixed! For some reason even after i compiled the files in appdata wasnt updating, so in appdata it was still using the old weapon files instead of the new ones, so i had to copy the zombie_colt and zombie_colt_upgraded from the mods folder over to appdata and it worked.Thanks for your help saje!