Author Topic: Setweaponactive  (Read 973 times)

0 Members and 1 Guest are viewing this topic.

Offline Snipufin

  • Camper
  • ***
  • Posts: 281
Setweaponactive
« on: February 14, 2008, 11:27:15 am »
How the hell does it exactly work? It doesn't disable M79 if SetWeaponActive(0,7,false); is done?
Quote
Name:     Snipufin
Posts:    111 (1.11 per day)
Position:    Soldier
Karma:    -11

Offline ghg

  • Camper
  • ***
  • Posts: 411
  • Village Idiot
Re: Setweaponactive
« Reply #1 on: February 14, 2008, 11:39:46 am »
Yeah, I noticed exactly the same when I tried to use it, maybe we're just silly and arn't supposed to use boolean for the last bit?
-=Gradius wuz you=-

Offline Snipufin

  • Camper
  • ***
  • Posts: 281
Re: Setweaponactive
« Reply #2 on: February 14, 2008, 11:59:18 am »
We have been told to use the boolean. So why should we not use it?
Quote
Name:     Snipufin
Posts:    111 (1.11 per day)
Position:    Soldier
Karma:    -11

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Setweaponactive
« Reply #3 on: February 14, 2008, 03:37:26 pm »
I havn't used it in a while, but i think its that the first # (specified player ID) can not be 0 for all players.. you'd have to use a for loop to set every1's m79's availability to false..
Code: [Select]
var
  i: byte;
begin
  for i := 1 to 32 do SetWeaponActive(i, 7, false);
end;

Offline ghg

  • Camper
  • ***
  • Posts: 411
  • Village Idiot
Re: Setweaponactive
« Reply #4 on: February 14, 2008, 03:46:01 pm »
Using SetWeaponActive(ID,2,false); on OnJoinTeam doesn't seem to work either though?
-=Gradius wuz you=-

Offline Boblekonvolutt

  • Soldier
  • **
  • Posts: 222
  • "YOU are a CAR."
Re: Setweaponactive
« Reply #5 on: February 14, 2008, 07:19:58 pm »
0 works fine for me...

Offline danmer

  • Camper
  • ***
  • Posts: 466
  • crabhead
Re: Setweaponactive
« Reply #6 on: February 16, 2008, 04:25:16 am »
Using SetWeaponActive(ID,2,false); on OnJoinTeam doesn't seem to work either though?
try using it on respawn or in AppOnIdle

Offline rhide

  • Major
  • *
  • Posts: 60
  • Coffee-addict
    • Vrastar-Hai soldat clan
Re: Setweaponactive
« Reply #7 on: February 22, 2008, 01:00:19 pm »
Use on respawn then :E Apponidle should really be kept as simple as possible to minimize lag!
Warning! Division by zero seriously injures yourself and the people in your surroundings.

Proud member of Vrastar-Hai:
http://www.guldheden.com/~erga050/vrastar-hai