Post: Default Weapon Error Message Fix?
02-18-2016, 01:13 AM #1
BullyWiiPlaza
Climbing up the ladder
(adsbygoogle = window.adsbygoogle || []).push({}); When you use the default weapon and get killed, the lobby will crash and the game will display the following error message:
    No XModel loaded for weap index 1, model 0 (WEAPON_DEFAULTWEAPON)

Can this be fixed or should you just quit using the default weapon in general?

The code for giving the default weapon is as follows:
    giveDefaultWeapon()
{
weapon = "defaultweapon_mp";
self giveWeapon(weapon);
self giveMaxAmmo(weapon);
self switchToWeapon(weapon);
}
(adsbygoogle = window.adsbygoogle || []).push({});
02-18-2016, 01:37 AM #2
Would something like work

OnDeath()
{
if(DefaultWeapon==true);
{
self waittill ( "death" );
self giveWeapon("dsr50_mp");
self switchToWeapon("dsr50_mp");
}
}
02-18-2016, 04:31 PM #3
EternalHabit
Former Staff
Originally posted by BullyWiiPlaza View Post
When you use the default weapon and get killed, the lobby will crash and the game will display the following error message:
    No XModel loaded for weap index 1, model 0 (WEAPON_DEFAULTWEAPON)

Can this be fixed or should you just quit using the default weapon in general?

The code for giving the default weapon is as follows:
    giveDefaultWeapon()
{
weapon = "defaultweapon_mp";
self giveWeapon(weapon);
self giveMaxAmmo(weapon);
self switchToWeapon(weapon);
}


Just give the player godmode while using it. Thats what i do. The self.maxhealth godmode
02-18-2016, 05:35 PM #4
Loz
Vault dweller
Originally posted by BullyWiiPlaza View Post
snip


my idea was
self setBlockWeaponPickup("defaultweapon_mp", true);
idk tho, never tested it
02-18-2016, 05:40 PM #5
BullyWiiPlaza
Climbing up the ladder
Originally posted by Loz View Post
my idea was
self setBlockWeaponPickup("defaultweapon_mp", true);
idk tho, never tested it

Won't this make it so that you can't pickup a weapon? It should prevent you from dropping your current weapon instead.

This is a code snippet by Treyarch:
    weapon = "minigun_mp";
//This will make it so the player cannot pick up weapons while using this weapon for the first time.
self setBlockWeaponPickup(weapon, true);

:(

Ah, I found something but it's untested Smile

    level.disableWeaponDrop = true;
02-18-2016, 05:52 PM #6
Loz
Vault dweller
Originally posted by BullyWiiPlaza View Post
Won't this make it so that you can't pickup a weapon? It should prevent you from dropping your current weapon instead.

This is a code snippet by Treyarch:
    weapon = "minigun_mp";
//This will make it so the player cannot pick up weapons while using this weapon for the first time.
self setBlockWeaponPickup(weapon, true);

:(

Ah, I found something but it's untested Smile

    level.disableWeaponDrop = true;


dat works but for all weapons ofc
02-18-2016, 06:20 PM #7
BullyWiiPlaza
Climbing up the ladder
Originally posted by Loz View Post
dat works but for all weapons ofc

True, it's not the best solution but still better than nothing if it works :P
03-09-2016, 04:00 PM #8
Vondy Supreme
< ^ > < ^ >
Originally posted by BullyWiiPlaza View Post
When you use the default weapon and get killed, the lobby will crash and the game will display the following error message:
    No XModel loaded for weap index 1, model 0 (WEAPON_DEFAULTWEAPON)

Can this be fixed or should you just quit using the default weapon in general?

The code for giving the default weapon is as follows:
    giveDefaultWeapon()
{
weapon = "defaultweapon_mp";
self giveWeapon(weapon);
self giveMaxAmmo(weapon);
self switchToWeapon(weapon);
}


I wish there was a way to change weapon models. It'd fix both the error issue and the freezing issue.
03-09-2016, 04:54 PM #9
Patrick
League Champion
Originally posted by EliteGamer01031 View Post
I wish there was a way to change weapon models. It'd fix both the error issue and the freezing issue.


They is,
    self setViewModel("veh_t6_drone_hunterkiller");
setDvar("cg_gun_x", "6");
setDvar("cg_gun_y", "-6");
setDvar("cg_gun_z", "-6");

The following user thanked Patrick for this useful post:

BoatyMcBoatFace

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo