PDA

View Full Version : Weapon help!



Loveboy
27th December 2012, 19:19
Hello guys, you know if you get a mp44? self setweaponslotweapon("NEED HELP","mp44_mp");
So i can use primary or primaryb
but i want that the weapon will change, wich i have in my hand. (which i have current in my hand)
You know that?

kung foo man
28th December 2012, 22:20
// replace current weapon
newWeapon = "mp44_mp";
player takeWeapon(player getCurrentWeapon());
player giveWeapon(newWeapon);
player switchToWeapon(newWeapon);

IzNoGoD
28th December 2012, 23:09
Crashes developer enabled server on ladders.

Peterlankton
29th December 2012, 09:33
In CoD2 I always used this method:


newWeap = "mp44_mp";
curWeap = player getCurrentWeapon();
slot = "primary";
if(player getWeaponSlotWeapon("primary") != curWeap)
slot = "primaryb";
player setWeaponSlotWeapon(slot, newWeap);


Done!

Loveboy
29th December 2012, 18:50
thank you all

kung foo man
30th December 2012, 04:27
There is a thank-you-button, please use it ;)