Results 1 to 6 of 6
  1. #1
    adaragas's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Australia
    Posts
    25
    Reputation
    10
    Thanks
    17

    Switching equipment mid-game

    Alright, my plan is to switch equipment from throwing knife to semtex on command. I've played around with giving semtex_mp perk and giving the user a semtex:
    Code:
    if(self.semtex == 1)
    	{
    		self thread monitorSemtex();
    		self maps\mp\perks\_perks::givePerk( "semtex_mp" );
    		self setWeaponAmmoClip("semtex_mp", 1);
    
    	}
    but i can seem to switch it from throwing knife to semtex MID game, is it even possible, and if so is there a way to remove perks mid game and gain new ones, WITHOUT dieing.

    thanks

  2. #2
    zxz0O0's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    209
    Reputation
    10
    Thanks
    136
    My Mood
    Aggressive
    Can you tell me since when did the semtex grenade become a perk? :S
    [YOUTUBE]Ja7-WnJcMcs[/YOUTUBE]

  3. #3
    [WhA]4FunPlayin's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    Not here
    Posts
    757
    Reputation
    8
    Thanks
    169
    My Mood
    Lonely
    Quote Originally Posted by zxz0O0 View Post
    Can you tell me since when did the semtex grenade become a perk? :S
    Since always.

    Now, good a way, just give it after he uses his old one.
    Code:
    self notifyOnPlayerCommand( "G", "+frag" );
    
    self waittill("G");
    maps\mp\perks\_perks::givePerk( "semtex_mp" );
    self setWeaponAmmoClip("semtex_mp", 1);
    self waittill("G");
    maps\mp\perks\_perks::givePerk( "frag_mp" ); //forgot name lol
    self setWeaponAmmoClip("frag_mp", 1);
    self waittill("G");
    maps\mp\perks\_perks::givePerk( "semtex_mp" );
    self setWeaponAmmoClip("semtex_mp", 1);

  4. The Following User Says Thank You to [WhA]4FunPlayin For This Useful Post:

    zxz0O0 (10-03-2010)

  5. #4
    zxz0O0's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    209
    Reputation
    10
    Thanks
    136
    My Mood
    Aggressive
    Quote Originally Posted by [WhA]4FunPlayin View Post
    Since always.
    If you would have watched at the givePerk code you would know that the function will just relay it to giveWeapon if there is a _mp (like in semtex_mp) so its not a perk. But this works too. (Sorry for smart ass/ )
    [YOUTUBE]Ja7-WnJcMcs[/YOUTUBE]

  6. #5
    Cholerix's Avatar
    Join Date
    May 2010
    Gender
    male
    Posts
    4
    Reputation
    10
    Thanks
    0
    There's something like that in RollTheDice. Maybe you should take a look at the code of this mod. If you roll it, it's called "changing equipment" or something like that.

  7. #6
    [WhA]4FunPlayin's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    Not here
    Posts
    757
    Reputation
    8
    Thanks
    169
    My Mood
    Lonely
    Quote Originally Posted by zxz0O0 View Post
    If you would have watched at the givePerk code you would know that the function will just relay it to giveWeapon if there is a _mp (like in semtex_mp) so its not a perk. But this works too. (Sorry for smart ass/ )
    IDK if it will make even sense, but I think aIW and steam is a little different at modding, doesn't make sense yea, but I never got semtex to work with giveWeapon, can you give me a code please? (how-to)

Similar Threads

  1. [Info] Switching Codes For Game Items
    By HackerTester in forum All Points Bulletin Reloaded Hacks
    Replies: 3
    Last Post: 10-30-2011, 02:36 PM
  2. Switching weapon in game.
    By Capsule in forum CrossFire Help
    Replies: 9
    Last Post: 07-31-2011, 06:30 PM
  3. [Solved]Changing Class Mid-game?
    By Azureum in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 2
    Last Post: 09-14-2010, 02:42 AM
  4. COD6 console game type switch?!
    By slaghos in forum Call of Duty Modern Warfare 2 Help
    Replies: 10
    Last Post: 02-04-2010, 09:57 AM
  5. Gaming Equipment
    By LACounty in forum Combat Arms Discussions
    Replies: 3
    Last Post: 11-11-2009, 12:31 AM