When testing my map in multiplayer, after a player dies out and spawns back in, he does not spawn in with a gun. I've tried looking through the scripts for respawning and I can't find the part where the gun is given back. If it helps, I have replaced the Colt with the Tac-45. Upon initial spawn in, all players are given the Tac-45 and everything functions normally until they bleed out and spawn back. Thanks in advance for your help!
it maybe it had to do with this in _zombiemode_weapons? if( primaryWeapons == "zombie_colt" ) if it is then change zombie colt with the name of your beginning weapon
Are you giving it at start of game somewhere? Did you edit your loadout?
My loadout doesn't work like the stock one anymore but if I remember correctly add_weapon(your weapon), set_laststand_pistol(your weapon), and set_switch_weapon( your weapon ) are the key parts to look at under the getdvar( "zombiemode" ) section, for the starting and laststand pistols, as well as respawn I think.
YaPhil made a fix for this, it's a pretty common issue (even if you don't use a custom starting pistol) Paste this anywhere in your mapname.gsc -
Code Snippet
Plaintext
// Attempts to fix the "no gun on respawn" error give_gun_on_spawn_think() { self endon("disconnect"); flag_wait("all_players_spawned"); //iPrintLn("Running loop on player " + self GetEntityNumber()); while(true) { self waittill("spawned_player"); wait_network_frame(); wait(3); //iPrintLn("Giving a weapon to respawned player " + self GetEntityNumber()); self GiveWeapon("zombie_tac45"); self SwitchToWeapon("zombie_tac45"); } }
And add this line somewhere after _zombiemode::main()