Author Topic: weapon numbers  (Read 1727 times)

0 Members and 6 Guests are viewing this topic.

Offline corl45

  • Major
  • *
  • Posts: 51
  • PWNED!
    • www.freewebs.com/tylersmod
weapon numbers
« on: December 10, 2007, 06:15:47 pm »
ok, on a script im making, im using the force(ID,primary,secondary,ammo: Byte);  command, and i have the numbers for the deagles-minigun (1-10) and the ussocom is 0. i need the numbers for knife, chainsaw and LAW.

a full weapon list would help even more. thx
BE AWESOME!

Offline Kavukamari

  • Camper
  • ***
  • Posts: 435
  • 3.14159265358979, mmm... pi
Re: weapon numbers
« Reply #1 on: December 10, 2007, 08:21:42 pm »
< 0 = ???
0=socom
1=deagles
2=hkmp5
3=ak-74
4=steyraug
5=spas
6=ruger
7=m79
8=barret
9=fnminimi
10=minigun
11=flamer
12=bow
13=flame bow
14=knife
15=saw
16=law
17-254=reload?
255 = no weapon (fists)

btw, isn't Ammo an integer? (doesn't really matter, but just wondering)
« Last Edit: December 10, 2007, 08:23:16 pm by Kavukamari »
"Be mindful of fame, show a mighty courage, watch against foes. Nor shalt thou lack what thou desirest, if with thy life thou hast comest out from that heroic task."

Offline TheToast

  • Major
  • *
  • Posts: 52
Re: weapon numbers
« Reply #2 on: December 10, 2007, 08:58:03 pm »
Ammo is a byte, maximum ammo is 255.

Offline corl45

  • Major
  • *
  • Posts: 51
  • PWNED!
    • www.freewebs.com/tylersmod
Re: weapon numbers
« Reply #3 on: December 10, 2007, 10:54:31 pm »
thx!, do you guyz now how i could make it forcewep without changing both weapons, so i could change just your primary or just your secondary?
BE AWESOME!

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: weapon numbers
« Reply #4 on: December 11, 2007, 06:18:55 am »
ForceWeapon(1, 15, GetPlayerStat(1, 'Secondary'), 0);
or if u wanted to change only secondary
ForceWeapon(1, GetPlayerStat(1, 'Primary'), 15, 0);

Offline KwS Pall

  • Major(1)
  • Posts: 49
  • I'm going to write Tibia for Soldat
Re: weapon numbers
« Reply #5 on: December 11, 2007, 08:46:45 am »
i have made script that show me all weapons - numbers
50 is a frag grenade
I'm going to write Tibia for Soldat

Offline corl45

  • Major
  • *
  • Posts: 51
  • PWNED!
    • www.freewebs.com/tylersmod
Re: weapon numbers
« Reply #6 on: December 11, 2007, 08:56:14 am »
ForceWeapon(1, 15, GetPlayerStat(1, 'Secondary'), 0);
or if u wanted to change only secondary
ForceWeapon(1, GetPlayerStat(1, 'Primary'), 15, 0);

ok, thx, gona have to remember that gestplayerstat, i think i used it in one of my scirpts.. but i cant remember

but for it to work on all characters in a server... wouldn't it be



*OnPlayerCoammnd*

forceWeapon(ID,15,GetPlayerStat(ID,'Secondary'),0);
« Last Edit: December 11, 2007, 09:01:23 am by corl45 »
BE AWESOME!

Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Re: weapon numbers
« Reply #7 on: December 11, 2007, 09:55:06 am »
i have made script that show me all weapons - numbers
50 is a frag grenade
lol, thats not true.

Offline KwS Pall

  • Major(1)
  • Posts: 49
  • I'm going to write Tibia for Soldat
Re: weapon numbers
« Reply #8 on: December 11, 2007, 12:30:57 pm »
wanna screenshot?
I'm going to write Tibia for Soldat

Offline Kavukamari

  • Camper
  • ***
  • Posts: 435
  • 3.14159265358979, mmm... pi
Re: weapon numbers
« Reply #9 on: December 11, 2007, 03:00:25 pm »
"Be mindful of fame, show a mighty courage, watch against foes. Nor shalt thou lack what thou desirest, if with thy life thou hast comest out from that heroic task."

Offline chrisgbk

  • Moderator
  • Veteran
  • *****
  • Posts: 1739
Re: weapon numbers
« Reply #10 on: December 11, 2007, 03:46:26 pm »
Considering that grenades aren't a weapon, but are a powerup, and tracked differently... lol.

Offline KwS Pall

  • Major(1)
  • Posts: 49
  • I'm going to write Tibia for Soldat
Re: weapon numbers
« Reply #11 on: December 12, 2007, 09:51:13 am »
just simply do this code:
Code: [Select]
procedure ActivateServer();
var
WepName: string;
i: integer;
begin
   for i := 1 to 255 do
    begin
    WepName := WeaponNameByNum(i);
    WriteLn(inttostr(i) + ' ' + WepName);
   end;
  end;
I'm going to write Tibia for Soldat

Offline chrisgbk

  • Moderator
  • Veteran
  • *****
  • Posts: 1739
Re: weapon numbers
« Reply #12 on: December 12, 2007, 04:08:40 pm »
just simply do this code:
Code: [Select]
procedure ActivateServer();
var
WepName: string;
i: integer;
begin
 for i := 1 to 255 do
 begin
 WepName := WeaponNameByNum(i);
 WriteLn(inttostr(i) + ' ' + WepName);
 end;
 end;

I just had a look in the code, and there actually is a value for Grenades; but I don't believe it actually works to be able to give as a weapon to someone, due to how grenades are handled. I believe it's just a placeholder for the damage stats.

But I'm really not sure on that; in all likeliehood attempting to actually use it could cause an array access to go out of bounds and in the worst case cause a crash, best case cause strange side effects, such as the other values causing you to reload.

Offline corl45

  • Major
  • *
  • Posts: 51
  • PWNED!
    • www.freewebs.com/tylersmod
Re: weapon numbers
« Reply #13 on: December 12, 2007, 06:12:03 pm »
what has my thread turned into!!?!?!   lol.
BE AWESOME!