Once again, it seems as if I am the only one who uses this section, but whatever.
Here is what i am trying to accomplish. To store the players current weapon as a variable, and to be able to call back that weapon at a later point in time.
I am trying to let the player scroll through a number of different "weapons" including golden deagle, laptop, bomb etc and then once they are the end of the list, go back to the weapon they were previously using.
The giving individual weapons looks like this:
self waittill( "Up" );
{
self takeAllWeapons();
self.BulletModOn = 0; // this turns off the explosive bullets in a different part of the patch so that throwing knifes dont randomly explode
self giveWeapon("deserteaglegold_mp");
self switchToWeapon("deserteaglegold_mp");
wait .2;
}
And has that for a number of different weapons. But for the last one, i want it to revert back to the players original weapon.
I have tried:
self getCurrentWeapon() = "default";
and then, later in the same thread:
self giveWeapon("default");
self switchToWeapon("default");
I have a feeling that this is not very far off what should work. If anyone has done this before, please help me out. I will continue to mess around with it and see if i can get it to work.