Posts: 916
Threads: 65
Joined: Jun 2011
07-19-2011, 21:33
(This post was last modified: 07-19-2011, 21:35 by Scripts18.)
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)
Posts: 916
Threads: 65
Joined: Jun 2011
07-19-2011, 21:50
(This post was last modified: 07-19-2011, 21:50 by Scripts18.)
(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
Posts: 916
Threads: 65
Joined: Jun 2011
(07-19-2011, 21:59)Pozzuh Wrote: C++ 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?
Posts: 5,135
Threads: 241
Joined: Nov 2010
Reputation:
100
I have no idea what you want..
Posts: 916
Threads: 65
Joined: Jun 2011
Oh well I will do it the hard way, nvm :S
Posts: 916
Threads: 65
Joined: Jun 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
Posts: 1,185
Threads: 72
Joined: Jan 2011
Reputation:
25
What exactly do u want now? xD