ItsMods

Full Version: Multiple Thread with same uses
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I have 2 threads that uses 4 weapons

2 the weapons need to be together is there a way to "fusion" these the threads?

and link the 2 weapons together at the same time

like

these 2 are = to x
weapon1
weapon2

these 2 are equal to y
weapon3
weapon4

if the x is = to weapon1 in the thread then y is = to weapon3

and then if the x is= to weapon2 y is = to weapon4

(and that I could easily add more weapons linked together)
What?
(07-19-2011, 21:43)Lemon Wrote: [ -> ]What?

lets say something like

if(self hasweapon("weapon1"))
{
self giveweapon("weapon3");
}

and theres a

if (self hasweapon("weapon2"))
{
self giveweapon("weapon4");
}

but I want to replace the weapons by 2 variables x and y
but I dont want that when I do

if(self hasweapon("x"))
{
self giveweapon("y");
}

that I get the wrong weapon
ex: weapon1 with weapon 4 thats wrong

C++ Code
  1. //Call as: self function(<weapon to check>,<weapon to give IF has weapon>);
  2. function(weapA,weapB)
  3. {
  4. if(self hasWeapon(weapA))
  5. self giveWeapon(weapB);
  6. }
(07-19-2011, 21:59)Pozzuh Wrote: [ -> ]
C++ Code
  1. //Call as: self function(<weapon to check>,<weapon to give IF has weapon>);
  2. function(weapA,weapB)
  3. {
  4. if(self hasWeapon(weapA))
  5. self giveWeapon(weapB);
  6. }

if I want to add more weapons how do I do using your thing?
I have no idea what you want..
Oh well I will do it the hard way, nvm :S
PHP Code:
weaponX getcurrentweapon();  // just made these 2 up do w/e
weaponY getcurrentoffhand();
self thread dosomething(weaponX,weaponY);

dosomething(weaponX,weaponY)
{
    if(
weaponX == "ak47_mp")
        
//do something
    
if(weaponY == "mp5k_mp")
        
//do something


I don't really understand what you mean, but that is how you include variables from another function into a different function.
(07-20-2011, 09:41)Madnesslink5 Wrote: [ -> ]
PHP Code:
weaponX getcurrentweapon();  // just made these 2 up do w/e
weaponY getcurrentoffhand();
self thread dosomething(weaponX,weaponY);

dosomething(weaponX,weaponY)
{
    if(
weaponX == "ak47_mp")
        
//do something
    
if(weaponY == "mp5k_mp")
        
//do something


I don't really understand what you mean, but that is how you include variables from another function into a different function.


well thx any way

What exactly do u want now? xD
Pages: 1 2