[SOLVED] multiple actionslot help(new question last post)

Posts 1–10 of 10 · Page 1 of 1
[SOLVED] multiple actionslot help(new question last post)
Hi mpgh,

I am creating a mod, but i've run in to three problems untill now, and i hope that somebody could help me

1st: I want to make something where you spawn, and you can select a class you get, but the classes are different for tf141 and russians, is there a way that i can check on which team the player is?

2nd: I am trying to use actionslots to select a class, but my actionslot doesn't do anything, and it says it's unbound

Code i use below
Code:
doClass()
{
        self endon ( "disconnect" );
                self endon ( "death" );
   self notifyOnPlayerCommand("n", "+actionslot 1");
                                while ( 1 )
                                {

		self iPrintlnBold("Press [{+actionslot1}] for SpecOps class");
	self waittill( "[{+actionslot1}]" );
	self thread doSPOclass();

	}
}

doSPOclass()
{

	self giveWeapon( "masada_reflex_mp", 0, false );self GiveMaxAmmo("masada_reflex_mp");
	self giveWeapon( "cheytac_fmj_xmags_mp", 0, false );self GiveMaxAmmo("cheytac_fmj_xmags_mp");
	self giveWeapon( "usp_akimbo_fmj_mp", 0, false );self GiveMaxAmmo("usp_akimbo_fmj_mp");
	self switchToWeapon("masada_reflex_mp");
		setDvar("laserForceOn", 1);
		setDvar("perk_weapSpreadMultiplier" , 0.3);
	self maps\mp\perks\_perks::givePerk("specialty_bulletaccuracy");
	self maps\mp\perks\_perks::givePerk("specialty_extraammo");
	self maps\mp\perks\_perks::givePerk("specialty_fastsnipe");
	self maps\mp\perks\_perks::givePerk("specialty_lightweight");

}
3rd: How can i disable an actionslot after it's used?

Thanks in advance

- Yaxxo
You use this to check what team they're on:
Code:
if(self.team == "allies") //TF141, Rangers
if(self.team == "axis") //OpFor, Spetsnaz
Also, it says 'Unbound' because you wrote +actionslot1 instead of +actionslot 1.

For the 'once' only thing, change the code so it looks like this:
Code:
doClass()
{
        self endon ( "disconnect" );
                self endon ( "death" );
   self notifyOnPlayerCommand("n", "+actionslot 1");
    self.chosen = 0;
                                for(;;) //I like using for more ^^
                                {

        self iPrintlnBold("Press [{+actionslot 1}] for SpecOps class");
    self waittill( "n" );
    self.chosen = 1;
    self thread doSPOclass();
    if(self.chosen == 1)
    break; //Break basically ends the loop
    wait 0.1;
    }
}
Works like a charm, thanks for helping and thanks for the fast response

Can somebody help me on this?
I know how to check if the player is holding a specific weapon,
How do i check if he isn't holding a specific weapon?
I know how to use that to see if the player is holding a weapon, but i want to know if the player isn't holding the masada, because i want something to disable when the player isn't holding the weapon, and enabling while he is holding it.
if(self getCurrentWeapon() != "masada_mp")
Thanks for the effort, but how do i enable a dvar if he is not holding the masada, but holding a different weapon?

The question about the map is already solved
Thanks in advance
Do not doublepost please.

/posts merged
Code:
if(self getCurrentWeapon() != "masada_mp")
{
    setDvar("whatever", 100);
}
/Marked as Solved
Posts 1–10 of 10 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?