Request Random classes
#11
(07-26-2011, 18:16)SrK Wrote:
(07-26-2011, 13:02)Kipiop Wrote:
(07-26-2011, 11:37)SrK Wrote: self Takeallweapons();

thx for that it works indeed, but not in first spawn for the AI, and when i die i spawn with no weapon at all unless i mousescroll.

Try this :
PHP Code:
onPlayerSpawned() { self endon("disconnect"); for(;;) { // ----- List of weapon in array myArray = []; myArray[0]= "aug_mp"; myArray[1]= "ak47_mp"; myArray[2]= "m16_mp"; // -------------------------------- self waittill("spawned_player"); myVar = RandomInt[3]; self Takeallweapons(); self giveWeapon( myVar , 0 , false); self switchToWeapon( myVar ); }

myVar = RandomInt[3];

should be

myVar = myArray[RandomInt(myArray.size)];
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  [Release] [SOURCE] Random Weapons. [HARD] Tony. 1 6,145 11-08-2013, 11:11
Last Post: Nekochan
  Help source random weapons [HARD] Tony. 4 6,550 11-08-2013, 05:25
Last Post: [HARD] Tony.
  Help choose 2 random players?(1 each team) 26hz 6 6,278 09-12-2013, 17:32
Last Post: Yamato
Rainbow [Release] MW3: Random Weapon Plugin V1 Nekochan 50 44,642 09-11-2013, 15:11
Last Post: EnVi Sweden Rocks
Exclamation [Request] Random Weapon At Spawn Scripts18 3 6,795 07-27-2013, 23:53
Last Post: DidUknowiPwn
  Help Receiving a random primary & secondary DidUknowiPwn 5 6,024 07-22-2013, 09:47
Last Post: Yamato
  [Release] 15 classes in MW3 OrangePL 14 19,298 06-28-2013, 19:14
Last Post: X-Track
  What script controls the "random" aspect to care packages? akillj 2 4,536 06-05-2013, 11:24
Last Post: akillj
  Random anims master131 14 14,298 05-24-2013, 09:45
Last Post: [HARD] Tony.
  [Request] Random player model hillbilly 1 3,844 05-12-2013, 08:30
Last Post: archit

Forum Jump:


Users browsing this thread:
1 Guest(s)

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