Author Topic: I'll get a flood kick...  (Read 879 times)

0 Members and 1 Guest are viewing this topic.

Offline MR-93

  • Major(1)
  • Posts: 15
I'll get a flood kick...
« on: May 11, 2008, 01:24:00 pm »
I have a problem with this.... i'll get a flood kick

Code: [Select]
procedure OnWeaponChange(ID, PrimaryNum, SecondaryNum: Byte);
begin
if GetPlayerStat(ID,'Team') = 2 then begin
forceWeapon(ID,255,GetPlayerStat(ID,'Secondary'),0);
end;
end;
i want when blue team player gets a wepon, it will lost

Offline sai`ke

  • Camper
  • ***
  • Posts: 318
  • Can't be arsed to remove christmas avatar
Re: I'll get a flood kick...
« Reply #1 on: May 11, 2008, 01:46:46 pm »
Check if primary and secondary aren't 255 already or it will go into an endless loop :p
#soldat.ttw #ttw.gather --- Quakenet!
http://ttwforums.com

Offline Rampage_Terranius

  • Major
  • *
  • Posts: 69
  • The Strategist
    • Soldat Noob Servers
Re: I'll get a flood kick...
« Reply #2 on: May 20, 2008, 09:51:42 am »
This should do the trick for you
Code: [Select]
Procedure OnWeaponChange(ID, PrimaryNum, SecondaryNum: Byte);
Begin
  if GetplayerStat(ID,'Team') = 2 then begin
    if PrimaryNum <> 255 then ForceWeapon(ID, 255, 255, 0)
  end;
end;
i didnt test it but it should automatically force the player no gun if they grab a gun that isn't fist :P