Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Random Player Select - New Problem
#11
Code:
SelectBossPaladin()
{
    level endon ( "game_ended" );
    level waittill("grace_period_ending");
    
    level.BossPaladin = level.alivePlayers["axis"][randomint(level.alivePlayers["axis"].size)];    
    
    Countdown = level createServerFontString("default", 1.5);
    Countdown setPoint( "CENTER", "CENTER", "CENTER", "CENTER" );
    Countdown.foreground = false;
    Countdown.hidewheninmenu = true;
    for(i=7;i>0;i--)
    {
        Countdown setText("^7SEARCHING FOR THE BOSSPALADIN: " + "^3" + i);
        wait 1;
    }    

    Countdown setText("^7THE BOSS PALADIN: " + "^9" + level.BossPaladin.name);
    wait 2;
    Countdown destroy();
    level.BossPaladin takeAllWeapons();
    level.BossPaladin clearPerks();
    level.BossPaladin thread doBossPaladin();
}

for(;;)
    {
        self waittill("spawned_player");
        self takeAllWeapons();
        self clearPerks();
        if(!isdefined(self.hud_rankscroreupdate))
        {
            self.hud_rankscroreupdate = NewScoreHudElem(self);
            self.hud_rankscroreupdate.horzAlign = "center";
            self.hud_rankscroreupdate.vertAlign = "middle";
            self.hud_rankscroreupdate.alignX = "center";
            self.hud_rankscroreupdate.alignY = "middle";
             self.hud_rankscroreupdate.x = 0;
            if( self IsSplitscreen() )
                self.hud_rankscroreupdate.y = -15;
            else
                self.hud_rankscroreupdate.y = -60;
            self.hud_rankscroreupdate.font = "default";
            self.hud_rankscroreupdate.fontscale = 2.0;
            self.hud_rankscroreupdate.archived = false;
            self.hud_rankscroreupdate.color = (0.5,0.5,0.5);
            self.hud_rankscroreupdate.alpha = 0;
            self.hud_rankscroreupdate maps\mp\gametypes\_hud::fontPulseInit();
            self.hud_rankscroreupdate.overrridewhenindemo = true;
        }
        
        if((self != level.BossPaladin && isDefined(level.BossPaladin)) || !isDefined(level.BossPaladin))
        {
            if(self.team == "axis")
            {
                self thread doPaladin();
            }
            else
            {
                self thread doJumper();
            }
            
        }
        else if(self.team == "axis" && self == level.BossPaladin)
        {
            self thread doBossPaladin();
        }    
    }      
}

?
helped ya? rep me +
Reply

#12
Thx @met. Smile
Now the Paladin Boss get his Weapons, but when u gonna die u will get three weapons Sad
The Paladin(boss)/Jumper Weapon AND your default class weapons...Sad
Reply

#13
WHY I HAVE THREE WEPS?? Sad

EDIT:
Maybe something wrong with the weapon function:

PHP Code:
Weapon(wep)
{
self endon("disconnect");
         
         
self giveWeapon(wep0);

        for(;;)
        {
         
self waittill("spawned_player");

         
self giveWeapon(wep0);
        } 

Reply

#14
take all weapons on spawned_player and only give the allowed ones.
Reply

#15
(03-07-2011, 12:03)SuperNovaAO Wrote: take all weapons on spawned_player and only give the allowed ones.

i already did but nothing happens
Reply

#16
Remove the for loop, that means that when you spawn it will keep piling with loops that will keep giving you more and more of the same gun!
[Image: 30xhrep.png]

A casual conversation between barata and I about Nukem.
Reply

#17
(03-07-2011, 12:41)master131 Wrote: Remove the for loop, that means that when you spawn it will keep piling with loops that will keep giving you more and more of the same gun!

No, doesnt work Sad
Without the for loop u dont get your Paladin/Jumper Weapon after dieing.

EDIT: After the Selecht PaladinBoss Function ive made a level notify("select_done")
And on PLayerSpawned ive made level waittill("select_done"). Maybe because this u will get your default weapons?
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Help Android problem Yamato 12 8,184 04-25-2014, 04:49
Last Post: ScHmIdTy56789
  [Release] [SOURCE] Random Weapons. [HARD] Tony. 1 4,106 11-08-2013, 11:11
Last Post: Nekochan
  Help source random weapons [HARD] Tony. 4 4,702 11-08-2013, 05:25
Last Post: [HARD] Tony.
  Help Sentry Gun kill = Player kill Snake 8 5,864 11-07-2013, 13:41
Last Post: Nekochan
  Problem with Rain Effects on Maps mitchhacker 5 4,862 10-22-2013, 00:46
Last Post: mitchhacker
  Player can write Fl0w_.JACKDAN 2 3,349 09-19-2013, 16:36
Last Post: Fl0w_.JACKDAN
  Help choose 2 random players?(1 each team) 26hz 6 4,649 09-12-2013, 17:32
Last Post: Yamato
Rainbow [Release] MW3: Random Weapon Plugin V1 Nekochan 50 33,278 09-11-2013, 15:11
Last Post: EnVi Sweden Rocks
Exclamation [Request] Random Weapon At Spawn Scripts18 3 4,739 07-27-2013, 23:53
Last Post: DidUknowiPwn
  Help Receiving a random primary & secondary DidUknowiPwn 5 4,402 07-22-2013, 09:47
Last Post: Yamato

Forum Jump:


Users browsing this thread:
2 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.