Page 1 of 1

Spawn without weapons

Posted: Sat Aug 02, 2003 1:43 pm
by Ramah Palmer
Ok, this is my second question in as many days that I am doubtful is in the right forum. Possibly better in scripting but as I know NOTHING about that I'll place it in here.
Is it possible to have a player spawn in a multiplayer map without any weapons?

Posted: Sat Aug 02, 2003 4:47 pm
by Alcoholic
yeah this should work:

Code: Select all

while (1)
{
    waitframe
    $player thread noweapon
}
end

noweapon:

    if (self.runningthread == 1)
    {
        end
    }
    else
    {
        self.runningthread = 1
        self thread noweaponspawn
    }
    end

noweaponspawn:

    self waittill death
    self waittill spawn
    self takeall
    
    thread noweaponspawn
    end
i may have forgot something, but that should work. :wink:

Posted: Sun Aug 03, 2003 10:04 am
by Ramah Palmer
Thanks Alcoholic. I will try it later today.
Just one thing though if you see this before I start - where abouts in the script should this go? Sorry but I'm a total script spaz.
Does it go like, before the prespawn?
Thanks.

Posted: Sun Aug 03, 2003 6:33 pm
by Alcoholic
see the while (1)? place that at the end of your level waittill roundstart (if you dont have that then waittill spawn). it should automatically replace the end there. then after that first end, just paste everything else thats there.

Posted: Sat Sep 20, 2003 10:44 am
by Ramah Palmer
Ok, I'm sorry to dredge up such an old thread but I never did get this working. I put it on the back-burner coz I had plenty of other things to do on my map but now it is almost complete and this has got kind of urgent for me.
I did another search and found some other threads regarding this same topic and I tried every way suggested but nothing seems to work and I always spawn drawing that damned Thompson.
Most of the ways I've seen written involve:

$player takeall

But this just doesn't seem to want to work for me. Can anyone place an example of a working script with this noweapon thing here so I can check I've got everything in the correct places?
Thanks in advance. :)

Almost

Posted: Sun Sep 21, 2003 11:26 pm
by CorporalPunishment
I have no weapon areas in the spawn parts of my map.
The players spawn on top of a trigger that does "holster" then "takeall"

There are also triggers that remove weapons from players
as they re-enter the spawn part of the base.

So there is no spawn killing possible.

However if you have a primed grenade when the "takeall"
is executed it crashes the server.

Is there a way to safely remove weapons with a trigger?
I'm thinking that an +attack command may throw the grenade
and then do takeall.

Anyone know how to script that?

Here's my Script

Posted: Sun Sep 21, 2003 11:28 pm
by CorporalPunishment
Take_Weapons:

local.player = parm.other

if ((local.player.Equip != 0) || (local.player.dmteam ! local.player.curteam) )
{
// iprintln ("Weapons Removed!" )
local.player holster
local.player.Equip = 0

local.player playsound rifle_drop1
local.player.curteam = local.player.dmteam
local.player takeall

}

end