Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 55 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty: World at War
Category: CoDWW MP Mapping
CoD: World at War Multiplayer mapping and level design.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: spawn in multiplayer without weapon
nolman
General Member
Since: Apr 10, 2009
Posts: 18
Last: Nov 15, 2012
[view latest posts]
Level 1
Category: CoDWW MP Mapping
Posted: Monday, Sep. 27, 2010 10:29 pm
Hi,

For some reason i would like to be able to let players spawn without a weapon.

does anyone have any idea?

thnx,

nolman
Share |
sam_fisher3000
General Member
Since: Apr 18, 2007
Posts: 816
Last: Jul 16, 2016
[view latest posts]
Level 7
Im a fan of MODSonair
Category: CoDWW MP Mapping
Posted: Tuesday, Sep. 28, 2010 02:34 pm
You can try disabling the weapon. It might work. Or just restrict the weapons. However, what is the point of spawning with no weapon? What are you going to do? Just run around doing nothing? :D
Share |
nolman
General Member
Since: Apr 10, 2009
Posts: 18
Last: Nov 15, 2012
[view latest posts]
Level 1
Category: CoDWW MP Mapping
Posted: Tuesday, Sep. 28, 2010 06:26 pm
Well, we would like to do a little showcase of our map,
(a 3d version an existing big old building that was turned into an artcentre) to some people who wouldn't necessarely need a weapon to walk around :)

I tried to look for options in all the script files to disable the weapons
but couldn't find anything that worked.

How would you disable or "restrict" the weapons?

thnx,
nolman
Share |
Pedro699
General Member
Since: Jun 19, 2006
Posts: 781
Last: Dec 18, 2010
[view latest posts]
Level 7
Category: CoDWW MP Mapping
Posted: Wednesday, Sep. 29, 2010 09:31 am
If this is MP then a simple script should suffice:

Code:
disableAllWeapons()
{
   level thread onPlayerConnect();
}

onPlayerConnect()
{
    for(;;)
    {
        level waittill("connecting", player);
        player thread onPlayerSpawned();
    }
}

onPlayerSpawned()
{
    self endon("disconnect");
    
    for(;;)
    {
        self waittill("spawned");

        self disableWeapon();
    }
}


You will need to thread the disableAllWeapons() function from your main level gsc.

The player may be able to get around this by picking a different weapon immediately after they have spawned, but I haven't checked that.



edited on Sep. 29, 2010 05:33 am by Pedro699
Share |
nolman
General Member
Since: Apr 10, 2009
Posts: 18
Last: Nov 15, 2012
[view latest posts]
Level 1
Category: CoDWW MP Mapping
Posted: Thursday, Sep. 30, 2010 10:21 am
Hi,
thanks for the reply,

i used self disableWeapons();
without the "s" I get a script error.
and that works, but after the countdown the weapon returns.
any idea ?

grtz,

Share |
Pedro699
General Member
Since: Jun 19, 2006
Posts: 781
Last: Dec 18, 2010
[view latest posts]
Level 7
Category: CoDWW MP Mapping
Posted: Thursday, Sep. 30, 2010 11:12 am
Give this a try - it runs the disable command in a loop.

Code:
disableAllWeapons()
{
   level thread onPlayerConnect();
}

onPlayerConnect()
{
    for(;;)
    {
        level waittill("connecting", player);
        player thread onPlayerSpawned();
    }
}

onPlayerSpawned()
{
    self endon("disconnect");
    
    for(;;)
    {
        self waittill("spawned");

        self thread keepweapondisabled();
    }
}

keepweapondisabled()
{
   self endon("killed_player");
   self endon("disconnect");
   
   self notify("killweapondisable");
   
   self endon("killweapondisable");
   
   while(1)
   {
      self disableWeapons();
      
      wait 1;
   }
}


edited on Sep. 30, 2010 07:12 am by Pedro699
Share |
nolman
General Member
Since: Apr 10, 2009
Posts: 18
Last: Nov 15, 2012
[view latest posts]
Level 1
Category: CoDWW MP Mapping
Posted: Thursday, Sep. 30, 2010 11:01 pm
perfect!

Thanks a lot pedro699 !
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty: World at War : CoDWW MP Mapping

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»