Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help stopping certain people spawning in rounds
#1
any sort of dvar or something i can prevent certain players spawning in sd for a round or so?
Reply

#2
Not sure about how you could stop them spawning, but the very frame that they spawn, you could send them to spectator/different team/kill them.

Code:
init()
{
    level thread spawndvar();
}

spawndvar()
{
    if(getdvarint("scr_nospawn") == "")
    {
        setdvar("scr_nospawn", 0);
    }
}

onPlayerSpawned()
{
    self waittill("spawned_player");
    
    if(getdvarint("scr_nospawn") == 1)
        self suicide();   //   (or change team/put to spectate/whatever)
}

You'd have to edit it a little bit to make it work with certain players, just set the dvar to the players entity number, and when it checks the dvar check it against their entity number.
Reply

#3
ya i thought about doing it this way, was just hoping there was some dvar to stop people spawning in sd..


guess it will do for now, thanks anyways.
Reply

#4
(07-27-2011, 15:39)koil Wrote: any sort of dvar or something i can prevent certain players spawning in sd for a round or so?

this spawn a player:
Code:
self thread    [[level.spawnPlayer]]();

find this code on _globallogic_spawn.gsc and modify like this:
Code:
if(self.canspawn == 1)
{
self thread    [[level.spawnPlayer]]();
} else
{
level waittill("notify"); //or self waittill
self thread    [[level.spawnPlayer]]();
}
Reply

#5
(07-28-2011, 00:47)Puffiamo Wrote:
(07-27-2011, 15:39)koil Wrote: any sort of dvar or something i can prevent certain players spawning in sd for a round or so?

this spawn a player:
Code:
self thread    [[level.spawnPlayer]]();

find this code on _globallogic_spawn.gsc and modify like this:
Code:
if(self.canspawn == 1)
{
self thread    [[level.spawnPlayer]]();
} else
{
self waittill("notify");
self thread    [[level.spawnPlayer]]();
}

Change self.canspawn to self.pers["canspawn"] , because otherwise it will be lost after 1 round.
Reply

#6
if(self.pers["mod_ts"] != 1) {
self thread [[level.spawnPlayer]]();
}
else {
self thread respawn_asSpectator( self.origin + (0, 0, 60), self.angles );
spawnedAsSpectator = true;
}


worked well, thanks man.. I already had my own variable set from another thread, this worked great.
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Help Spawning carepackage helicopter -- DidUknowiPwn 4 4,066 11-08-2013, 08:18
Last Post: DidUknowiPwn
  Spawning Solid Models akillj 5 4,407 09-08-2013, 00:07
Last Post: akillj
  Chicken spawning possible? akillj 8 4,947 09-07-2013, 06:22
Last Post: ScHmIdTy56789
  Help Server not in list, but people join 99IRock 8 7,105 07-17-2013, 21:26
Last Post: clacki
  I need to sorry all of you people Bloodfocus 23 11,883 04-05-2013, 18:15
Last Post: SuperNovaAO
  I want to thank some people [2] Mods edition Arteq 7 6,115 04-05-2013, 18:10
Last Post: SuperNovaAO
Question Help Kick people with space in name koro35 13 8,359 01-06-2013, 14:14
Last Post: master131
Heart Thanking some people 99IRock 6 3,716 12-27-2012, 14:40
Last Post: kokole
  I want to thank some people 99IRock 5 3,579 12-26-2012, 18:33
Last Post: surtek
  [Request] ForgeMOD - Spawning Crates (MW3) Destroyer1834 8 5,981 11-23-2012, 14:56
Last Post: 99IRock

Forum Jump:


Users browsing this thread:
1 Guest(s)

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