droffy....
Moderator: Core Staff
droffy....
what is the scripting command to take away someone's weapons?
Yeah its listed in the Call of Duty 2\Docs\ScriptFunctions..i didnt know till recently they included a functions list, so that may be useful to know 

Watch this before posting a question: http://www.albinoblacksheep.com/flash/posting.php
-
- Core Staff
- Posts: 13315
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
This is correct.KillerSam wrote:List of handy commands here:
Use as needed.Code: Select all
remove_weapons() { self takeallweapons(); self giveweapon("kar98k_mp"); self setweaponslotammo("primary", 0); self setweaponslotclipammo("primary", 0); self switchtoweapon("kar98k_mp"); }
Just to add input, there are ways of taking specific weapons from people, or taking away the players secondary weapon, but they require a bit more input.

Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
-
- Core Staff
- Posts: 13315
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
This may work... put this in your main()...Soviet wrote:is there a way to make it work for when you spawn it takes away the weapons?
Code: Select all
thread onConnect();
Code: Select all
OnConnect()
{
for(;;)
{
level waittill("connecting",self);
self thread onPlayerSpawned();
}
}
Code: Select all
onPlayerSpawned()
{
for(;;)
{
self waittill("spawned_player");
self takeAllWeapons();
self giveWeapon("kar98k_mp");
self switchToWeapon("kar98k_mp");
}
}

Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
-
- Core Staff
- Posts: 13315
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
lol, nice attempt but they are all wrong, its just a matter of tense.KillerSam wrote:i think it should be
orCode: Select all
"connecting.self"
orCode: Select all
"connecting, self"
Not sure which, but try them (guess work tbh)Code: Select all
"connecting".self"
level waittill("connected", self);
Try^

Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
-
- Core Staff
- Posts: 13315
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
wheres the bad syntax on that line?Soviet wrote:you lose too, bad syntax on same line
its looks fine but my only guess is either the , is a . or the ; is a :

Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Who is online
Users browsing this forum: No registered users and 1 guest