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

Players die and respawns in with no weapons + limited to 1 gun after: Help

broken avatar :(
Created 7 years ago
by mesaacr
0 Members and 1 Guest are viewing this topic.
2,387 views
broken avatar :(
×
broken avatar :(
Location: ca
Date Registered: 7 April 2017
Last active: 3 years ago
Posts
11
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
×
mesaacr's Groups
mesaacr's Contact & Social Links225 Pine Drive
My bud and I were testing out my map and when either of us dies and respawns at the beginning of the next round, we spawn in with no guns, then when we do buy a gun from the wall or out of the mystery box, we are then only limited to have 1 gun as we try to buy another, it just replaces the first gun.

Any help is appreciated
broken avatar :(
×
broken avatar :(
Pragmatist
Location: in
Date Registered: 9 May 2015
Last active: 8 months ago
Posts
451
Respect
Forum Rank
Perk Hacker
Primary Group
UGX Site Moderator
My Groups
More
My Contact & Social Links
More
Personal Quote
Fish. That is all
Signature
×
Sidzzz's Groups
UGX Site Moderator Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
Sidzzz's Contact & Social LinkssidzzzzzzS1dzzzS1dzzzSidzzzSidTheGamer126
I remember having this issue due to an older version of HarryBo21's perks. Do you currently have them installed and if so, are you using the latest version?
Marked as best answer by mesaacr 7 years ago
broken avatar :(
×
broken avatar :(
Location: usgeorgia
Date Registered: 24 April 2013
Last active: 8 months ago
Posts
560
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Mapper
×
whippytrout's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
whippytrout's Contact & Social LinksWhippyTroutWhippyTrout
I had the exact same problem and couldn't figure out how to fix it until somebody told me to just add this into your mapname.gsc:

First add this:
Code Snippet
Plaintext
array_thread(get_players(), ::give_gun_on_spawn_think);

under this:
Code Snippet
Plaintext
maps\_zombiemode::main();

Then add this to the bottom of your mapname.gsc: (If you have a different starting pistol then change zombie_colt to whatever your starting pistol is.)
Code Snippet
Plaintext
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(1);
        //iPrintLn("Giving a weapon to respawned player " + self GetEntityNumber());
        self GiveWeapon("zombie_colt");
        self SwitchToWeapon("zombie_colt");
self.hastomahawk = 0;
    }
}
broken avatar :(
×
broken avatar :(
Location: ca
Date Registered: 7 April 2017
Last active: 3 years ago
Posts
11
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
×
mesaacr's Groups
mesaacr's Contact & Social Links225 Pine Drive
I remember having this issue due to an older version of HarryBo21's perks. Do you currently have them installed and if so, are you using the latest version?

no, i do not have them installed.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 9 May 2015
Last active: 5 years ago
Posts
103
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
Signature
"Mod builder lied. Everything isn't ok."
×
pwman123's Groups
pwman123's Contact & Social Linkspwman123pwman123pwman123
Quote
Code Snippet
Plaintext
I had the exact same problem and couldn't figure out how to fix it until somebody told me to just add this into your mapname.gsc:


AHA! I forgot how to fix this a while ago thank you!
broken avatar :(
×
broken avatar :(
Location: ca
Date Registered: 7 April 2017
Last active: 3 years ago
Posts
11
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
×
mesaacr's Groups
mesaacr's Contact & Social Links225 Pine Drive
I had the exact same problem and couldn't figure out how to fix it until somebody told me to just add this into your mapname.gsc:

First add this:
Code Snippet
Plaintext
array_thread(get_players(), ::give_gun_on_spawn_think);

under this:
Code Snippet
Plaintext
maps\_zombiemode::main();

Then add this to the bottom of your mapname.gsc: (If you have a different starting pistol then change zombie_colt to whatever your starting pistol is.)
Code Snippet
Plaintext
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(1);
        //iPrintLn("Giving a weapon to respawned player " + self GetEntityNumber());
        self GiveWeapon("zombie_colt");
        self SwitchToWeapon("zombie_colt");
self.hastomahawk = 0;
    }
}
thankyou very much
broken avatar :(
×
broken avatar :(
Location: nlApeldoorn
Date Registered: 17 December 2013
Last active: 1 year ago
Posts
1,187
Respect
1,404Add +1
Forum Rank
Zombie Colossus
Primary Group
Community Scripter Elite
My Groups
More
My Contact & Social Links
More
Personal Quote
It aint much, if it aint Dutch
Signature
×
BluntStuffy's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
Oil Rig Beta Access
Oil Rig Beta Access
BluntStuffy's Contact & Social LinksBluntstuffy@BluntZombieBluntStuffyStuffyZombie
I had the exact same problem and couldn't figure out how to fix it until somebody told me to just add this into your mapname.gsc:

Dunno who told you, and it doesn't really matter but that's YaPh1l's code. He posted that fix on ZM a long time ago..
( so you can add him to your credits, he was a freaking legend imo  ;D )
broken avatar :(
×
broken avatar :(
Location: usgeorgia
Date Registered: 24 April 2013
Last active: 8 months ago
Posts
560
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Mapper
My Groups
More
My Contact & Social Links
More
×
whippytrout's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
whippytrout's Contact & Social LinksWhippyTroutWhippyTrout
Dunno who told you, and it doesn't really matter but that's YaPh1l's code. He posted that fix on ZM a long time ago..
( so you can add him to your credits, he was a freaking legend imo  ;D )

Hahaha Sweet! I miss Yaph1l! I remember him and you helping me when I first started getting into custom zombies. Good times. I'll definitely add him to my credits.

 
Loading ...