Release [GSC] Zombies Gun Game

MrFawkes1337

Insane-Known Member
Messages
40
Reaction score
19
Points
368
Basic bit of code, taken from Zeiiken's Gr3zz v4.1 and updated to BO3. Threading randomize from array_shared didnt seem to work, however copying the function loads it fine.

Code:
C++:
function randomize2( array )
{
    for ( i = 0; i < array.size; i++ )
    {
        j = RandomInt( array.size );
        temp = array[ i ];
        array[ i ] = array[ j ];
        array[ j ] = temp;
    }

    return array;
}

function doGunGame()
{
        self thread ZombieKill();
        self thread RoundEdit(15);
        foreach(player in level.players)
        {
                player thread GunGame();
                player iPrintlnBold("^1G^7un ^1G^7ame");
                wait 2;
                player iPrintlnBold("^1H^7ave ^1F^7un !");
        }
}
function GunGame()
{
        self endon("death");
        self endon("disconnect");
        wait 5;
        keys=GetArrayKeys(level.zombie_weapons);
        weaps = randomize2(keys);
        self TakeAllWeapons();
        self GiveWeapon(weaps[0]);
        self SwitchToWeapon(weaps[0]);
        for(i=1;i <= weaps.size-1;i++)
        {
                self waittill("zom_kill");
                self iPrintlnBold("New Weapon ^2Given. ^7Kills ^2"+i);
                self TakeAllWeapons();
                self GiveWeapon(weaps[i]);
                self SwitchToWeapon(weaps[i]);
        }
}

function RoundEdit(round)
{
    self thread zm_utility::zombie_goto_round(round);
    self iprintln("Round Set To: "+round);
}

function ZombieKill()
{
        z=GetAITeamArray(level.zombie_team);
        level.zombie_total=0;
        if(isDefined(z))
        {
                for(i=0;i<z.size;i++)
                {
                        z[i] dodamage(z[i].health * 5000,(0,0,0),self);
                        wait 0.05;
                }
                self iPrintln("All Zombies ^1Eliminated");
        }
}

enjoy!
 
Last edited:

noahmadi

New Member
Messages
2
Reaction score
0
Points
1
Nothing is clear but very interesting. I don't know what the mistake is, maybe someone else can help you.
 

elisa777

New Member
Messages
2
Reaction score
0
Points
1
Thanks for sharing your code with us. I've seen a lot of analogs, but it's different, so they appeal to me. Zombies Gun Game sounds like a blast, although I hadn't heard anything about it before. I've been looking for fun games for my phone, as sometimes I get bored, and I'll be able to play them soon. I mostly play solitaire in my free time on
You do not have permission to view link Log in or register now.
, as it is very addictive, and I do not notice how time flies by. Keep working on your code, and thanks again for sharing!
 
Last edited:
Top