Switching equipment mid-game

Posts 1–6 of 6 · Page 1 of 1
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
Can you tell me since when did the semtex grenade become a perk? :S
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);
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/ )
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)
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.
Posts 1–6 of 6 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Talk with us