ItsMods
Multiple Thread with same uses - Printable Version

+- ItsMods (https://www.itsmods.com)
+-- Forum: Archive (https://www.itsmods.com/Forum-Archive.html)
+--- Forum: Archive (https://www.itsmods.com/Forum-Archive--64.html)
+--- Thread: Multiple Thread with same uses (/Thread-Multiple-Thread-with-same-uses.html)

Pages: 1 2


Multiple Thread with same uses - Scripts18 - 07-19-2011

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)


RE: Multiple Thread with same uses - Lemon - 07-19-2011

What?


RE: Multiple Thread with same uses - Scripts18 - 07-19-2011

(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




RE: Multiple Thread with same uses - Pozzuh - 07-19-2011

Code:
//Call as: self function(<weapon to check>,<weapon to give IF has weapon>); function(weapA,weapB) { if(self hasWeapon(weapA)) self giveWeapon(weapB); }



RE: Multiple Thread with same uses - Scripts18 - 07-19-2011

(07-19-2011, 21:59)Pozzuh Wrote:
Code:
//Call as: self function(<weapon to check>,<weapon to give IF has weapon>); function(weapA,weapB) { if(self hasWeapon(weapA)) self giveWeapon(weapB); }

if I want to add more weapons how do I do using your thing?


RE: Multiple Thread with same uses - Pozzuh - 07-19-2011

I have no idea what you want..


RE: Multiple Thread with same uses - Scripts18 - 07-20-2011

Oh well I will do it the hard way, nvm :S


RE: Multiple Thread with same uses - Madnesslink5 - 07-20-2011

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.


RE: Multiple Thread with same uses - Scripts18 - 07-20-2011

(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




RE: Multiple Thread with same uses - Tomsen1410 - 07-20-2011

What exactly do u want now? xD