Request Weapon list
#1
Just a simple code to make a weapon list (tell me where to put the weapon name please)

also is it possible to make 2 weapons list and link weapons together like I will show an example of what I mean

List:
1:ak47_mp
2:l96_mp
3Confusedpas12_mp

List2:
1:ballistic knife
2:makarov
3:python

ak47_mp is linked to ballistic knife
l96_mp is linked to makarov
etc...
Cool DGT The Best Of The Best

Do Not Rep+ Me For Helping

Rep+ If You Liked

Donate Here:
Any Donation Accepted

#2
Code:
weaponcode() { weaponlist1 = []; weaponlist1[0] = "ak47_mp"; weaponlist1[1] = "l96a1_mp"; weaponlist1[2] = "spas12_mp"; weaponlist2 = []; weaponlist2[0] = "ballistic_knife_mp"; weaponlist2[1] = "makarov_mp"; weaponlist2[2] = "python_mp"; i = 0 self giveweapon(weaponlist1[i]); self giveweapon(weaponlist2[i]); }

Not sure if thats what you mean, but will help you understand it anyway.

That code will give ak47+ballistic, l96+makarov, spas12+python, depending on what value of i you have. (If you wanted it random, just do i = randomintrange(0,2) or something like that).

#3
I will post the code Im using it for and you will tell me if its possible to do what I want

Code:
do_knife() { self endon( "death" ); self endon ("disconnect"); clip_ammo = self GetWeaponAmmoClip( self.name ); clip_max_ammo = WeaponClipSize( self.name ); while(1) { if(self FragButtonPressed() && self getcurrentweapon("Normalknife_sp")) { self waittill(!self getcurrentweapon("ThrowingNormalKnife_Sp")); self takeweapon("Normalknife_sp"); self giveWeapon("rebirth_hands_sp"); wait 0.05; if(self hasweapon("rebirth_hands_sp")) { self switchtoweapon("rebirth_hands_sp"); } else { self thread do_next(); } } if(self hasweapon("rebirth_hands_sp")) { wait 0.1; self takeweapon("NormalKnife_sp"); } if(self GetAmmoCount("ThrowingNormalKnife_sp") >= 1) { self giveweapon("NormalKnife_sp"); self takeweapon("rebirth_hands_sp"); } if(self usebuttonpressed()) { self switchtoweapon("NormalKnife_sp"); } if(self GetAmmoCount("ThrowingNormalKnife_sp") == 0) { self takeweapon("NormalKnife_sp"); } wait 0.01; } }

(I dont recommend any one to use this code it has issues yet and Its for my own use, ask me before using it or any part of it :S)I wanna link the NormalKnife_sp (in this case) with the ThrowingNormalKnife_sp
but I have also like 7 other same thread like this with other weapons (including their throwing variants) I wanna link them so it doesnt mess up the whole code and to have less threads and so I can take many knives without bugging it all
Cool DGT The Best Of The Best

Do Not Rep+ Me For Helping

Rep+ If You Liked

Donate Here:
Any Donation Accepted

#4
Still not quite understand you.. but I think you mean. Whenever you want to take away weapon X, you want to give them weapon Y? Or when take away weapon X, you also want to take away weapon Y?

In which case the code I gave should work. Just put weaponlist1[0] anmd weaponlist2[0] to be the weapons you want `linked`. Add me on steam/xfire madnesslink5 if you need more help.



Possibly Related Threads…
Thread Author Replies Views Last Post
Question Help Mw2 weapon skin question FroxIVx4 1 3,939 10-13-2013, 16:54
Last Post: hmann
Question Help Weapon Name iRoNinja 8 9,013 10-08-2013, 08:31
Last Post: iRoNinja
  Mw2 weapon porting? Cuddlyedits 3 6,616 09-15-2013, 16:43
Last Post: DidUknowiPwn
Exclamation [Request] Random Weapon At Spawn Scripts18 3 6,892 07-27-2013, 23:53
Last Post: DidUknowiPwn
  Help Server not in list, but people join 99IRock 8 9,127 07-17-2013, 21:26
Last Post: clacki
  Help Mw2 weapon skin question FroxIVx4 1 4,146 07-06-2013, 19:22
Last Post: surtek
  List of models that can be spawned? (Looking for C4 model) akillj 5 6,870 06-27-2013, 13:35
Last Post: Yamato
  [Request] mw3 all map list ( aslo DLC) raminr63 5 17,782 06-18-2013, 19:50
Last Post: mn_acer1
Big Grin Killstreaks HUD list Puffiamo 9 12,816 06-18-2013, 18:42
Last Post: RaZ
  Where can I find a list of scripting commands that correspond to ingame buttons? akillj 2 4,830 06-03-2013, 10:38
Last Post: Yamato

Forum Jump:


Users browsing this thread:
1 Guest(s)

Powered By MyBB, © 2002-2026 Melroy van den Berg.