Author Topic: Can someone make this to me?  (Read 1320 times)

0 Members and 1 Guest are viewing this topic.

Offline teemus1

  • Major(1)
  • Posts: 5
Can someone make this to me?
« on: October 24, 2008, 04:21:53 pm »
Can someone make me script what disables all other weapons than saw/knife/flamer for alpha team?
I have zombie server and im very bored to kick someones how join zombie team and use m79 etc...

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: Can someone make this to me?
« Reply #1 on: October 25, 2008, 05:15:37 am »
Code: [Select]
procedure OnJoinTeam(ID, Team: byte)
begin
  if Team <> 1 and 5 then Command('/setteam1 ' + IntToStr(ID));
end;

Offline Norbo

  • Camper
  • ***
  • Posts: 338
Re: Can someone make this to me?
« Reply #2 on: October 25, 2008, 09:17:00 am »
Code: [Select]
procedure OnJoinTeam(ID, Team: byte)
begin
  if Team <> 1 and 5 then Command('/setteam1 ' + IntToStr(ID));
end;

???

dude, your script is
1 wrong
2 completly not what teemus1 asked for

Offline ~Niko~

  • Rainbow Warrior
  • *****
  • Posts: 2410
Re: Can someone make this to me?
« Reply #3 on: October 25, 2008, 10:03:58 am »
just put more zombies on blue than on red team, limit the players to 1- than blue, and enable balance teams, this way nobody will be able to join bravo team.

Example: redplayers (humans) limit=6 Zombies playing 7 or more

Offline xmRipper

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 742
    • Personal
Re: Can someone make this to me?
« Reply #4 on: October 25, 2008, 10:06:07 am »
Disabling all other weapons than saw,knife,flamer for alpha team ;
(not tested)

Code: [Select]
procedure OnJoinTeam(ID, Team: byte);
var i: byte;
begin
    if Team = 1 then begin
        for i = 1 to 16 do begin
          // disable all weapons
          SetWeaponActive(ID,i,false);
        end;
       
        SetWeaponActive(ID,11,true); // enable flamer
        SetWeaponActive(ID,14,true); // enable knife
        SetWeaponActive(ID,15,true); // enable chainsaw
    end;
end;
Co-Founder / CTO @ Macellan
Founder Turkish Soldat Community

Offline GSx_Major

  • Major
  • *
  • Posts: 97
Re: Can someone make this to me?
« Reply #5 on: October 26, 2008, 05:34:30 am »
Should be := in the loop.
...and headbutt the sucker through your banana suit!

Offline teemus1

  • Major(1)
  • Posts: 5
Re: Can someone make this to me?
« Reply #6 on: October 26, 2008, 09:15:24 am »
Disabling all other weapons than saw,knife,flamer for alpha team ;
(not tested)

Code: [Select]
procedure OnJoinTeam(ID, Team: byte);
var i: byte;
begin
    if Team = 1 then begin
        for i = 1 to 16 do begin
          // disable all weapons
          SetWeaponActive(ID,i,false);
        end;
       
        SetWeaponActive(ID,11,true); // enable flamer
        SetWeaponActive(ID,14,true); // enable knife
        SetWeaponActive(ID,15,true); // enable chainsaw
    end;
end;

I don,t get that work :(

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: Can someone make this to me?
« Reply #7 on: October 26, 2008, 10:03:53 am »
Should be := in the loop.
...
for i := 1 to 16 do begin
...

Offline xmRipper

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 742
    • Personal
Re: Can someone make this to me?
« Reply #8 on: October 26, 2008, 10:24:18 am »
yes. sorry for my mistake. :)
This should be working:

Code: [Select]
procedure OnJoinTeam(ID, Team: byte);
var i: byte;
begin
    if Team = 1 then begin
        for i := 1 to 16 do begin
          // disable all weapons
          SetWeaponActive(ID,i,false);
        end;
       
        SetWeaponActive(ID,11,true); // enable flamer
        SetWeaponActive(ID,14,true); // enable knife
        SetWeaponActive(ID,15,true); // enable chainsaw
    end;
end;
Co-Founder / CTO @ Macellan
Founder Turkish Soldat Community

Offline BombSki

  • Flagrunner
  • ****
  • Posts: 927
    • Climbing-soldiers.net
Re: Can someone make this to me?
« Reply #9 on: October 26, 2008, 10:39:22 am »
isnt setweaponactive only for the weapon list? if so, since when is flamer in it?

as for the original problem: why not just make a script that doesnt allow human players to join alpha team

Offline teemus1

  • Major(1)
  • Posts: 5
Re: Can someone make this to me?
« Reply #10 on: October 27, 2008, 11:21:11 am »
yes. sorry for my mistake. :)
This should be working:

Code: [Select]
procedure OnJoinTeam(ID, Team: byte);
var i: byte;
begin
    if Team = 1 then begin
        for i := 1 to 16 do begin
          // disable all weapons
          SetWeaponActive(ID,i,false);
        end;
       
        SetWeaponActive(ID,11,true); // enable flamer
        SetWeaponActive(ID,14,true); // enable knife
        SetWeaponActive(ID,15,true); // enable chainsaw
    end;
end;

Lol now it disables all other weapons than ussocom and law :D
And to BombSki, i want itself play sometimes in zombie team.

Offline GSx_Major

  • Major
  • *
  • Posts: 97
Re: Can someone make this to me?
« Reply #11 on: October 27, 2008, 01:44:04 pm »
In SetWeaponActive, Knife is 12 and Chainsaw 13...
...and headbutt the sucker through your banana suit!

Offline xmRipper

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 742
    • Personal
Re: Can someone make this to me?
« Reply #12 on: October 27, 2008, 02:35:14 pm »
In SetWeaponActive, Knife is 12 and Chainsaw 13...

Hmm.

Core.pas
Quote from: Core.pas
//Weapons
  DEAGLES = 1;
  HKMP5 = 2;
  AK74 = 3;
  STEYR = 4;
  SPAS = 5;
  RUGER = 6;
  M79 = 7;
  BARRET = 8;
  MINIMI = 9;
  MINIGUN = 10;
  FLAMER = 11;
  BOW = 12;
  FLAMEBOW = 13;
  SOCOM = 0;
  KNIFE = 14;
  CHAINSAW = 15;
  LAW = 16;
Co-Founder / CTO @ Macellan
Founder Turkish Soldat Community

Offline BombSki

  • Flagrunner
  • ****
  • Posts: 927
    • Climbing-soldiers.net
Re: Can someone make this to me?
« Reply #13 on: October 27, 2008, 04:12:31 pm »
LAMER = 11;
  BOW = 12;
  FLAMEBOW = 13;

they dont exist in the weaponmenu. as i pointed out earlier ^^


edit: i see i failed to copy 'flamer' properly, but ill leave it as it is.