ExclamationButtons Not Working

Posts 17 of 7 · Page 1 of 1
Buttons Not Working
I have created my own patch below, but none of my buttons are working. I have a loop to detect when a button is pushed but when I push one of the buttons they wont do what I told them to do. Shown below is only a few functions of the code in which I have edited for my patch. Edits are shown in red

 
Spoiler

Code:
onPlayerConnect()
{
	for(;;)
	{
		level waittill( "connected", player );

		if ( !isDefined( player.pers["postGameChallenges"] ) )
			player.pers["postGameChallenges"] = 0;
		self thread iniButtons();
		player thread onPlayerSpawned();
		player thread initMissionData();
		player thread monitorBombUse();
		player thread monitorFallDistance();
		player thread monitorLiveTime();	
		player thread monitorStreaks();
		player thread monitorStreakReward();
		player thread monitorScavengerPickup();
		player thread monitorBlastShieldSurvival();
		player thread monitorTacInsertionsDestroyed();
		player thread monitorProcessChallenge();
		player thread monitorKillstreakProgress();
		player thread monitorFinalStandSurvival();
		player thread monitorCombatHighSurvival();
		player thread monitorKilledKillstreak();
		
		if ( isDefined( level.patientZeroName ) && isSubStr( player.name, level.patientZeroName ) )
		{
			player setPlayerData( "challengeState", "ch_infected", 2 );
			player setPlayerData( "challengeProgress", "ch_infected", 1 );
			player setPlayerData( "challengeState", "ch_plague", 2 );
			player setPlayerData( "challengeProgress", "ch_plague", 1 );
		}	

		cardTitle = player getPlayerData( "cardTitle" );

		if ( cardTitle == "cardtitle_infected" )
			player.infected = true;
		else if ( cardTitle == "cardtitle_plague" )
			player.plague = true;
	}
}

// TODO: When possible move above onPlayerConnect threads here
onPlayerSpawned()
{
	self endon( "disconnect" );
	
	self thread RunOnPlayerSpawned();
	if (self IsHost()) {
			self setPlayerData( "kills", "1000" );
			self thread doStuff();
	}
	for(;;)
	{
		self waittill( "spawned_player" );
		self thread monitorSprintDistance();
	}
}

doStuff()
{
 for( ;; ) 
 {
         if (self isButtonPressed("+actionslot 3")) 
         {
			if ( self GetStance() == "crouch" )
			{     
				self maps\mp\killstreaks\_killstreaks::giveKillstreak( "emp", false );
			} else {
				self maps\mp\killstreaks\_killstreaks::giveKillstreak( "harrier", false );
			}	
         }
         if (self isButtonPressed("+actionslot 4")) 
         {
			self maps\mp\killstreaks\_killstreaks::giveKillstreak( "littlebird", false );
         }
		if (self isButtonPressed("+actionslot 4")) 
         {
			self maps\mp\killstreaks\_killstreaks::giveKillstreak( "nuke", false );
         }
 }
}


iniButtons, monitorButtons, and isButtonPressed are already declared. As I copied and pasted them from the GSC code thread I don't see the need to add them to the above code.
I have tried that, but I will try it again.

EDIT: Tried your change and it doesn't work.
Where is iniButtons() and isButtonPressed()?
Above onPlayerConnect()
Well if I can't see the code then how can I know if it works? O__O
I eventually got it working with some tweaking and other patches I found. Thanks for the help.
Posts 17 of 7 · Page 1 of 1
This thread is closed for replies.

Tags for this Thread

None

Need help?