Jump to content
  • 0

[HELP] CTF Flag Timer


Question

Posted

CTF Engine

if any1 knows how to add check for time after a char takes the flag, than set max time that a char has to score, and if he doesnt score for the time than flag is taken back.

 

This doesnt work, static - non static conflict or sth :P

ThreadPoolManager.getInstance().scheduleGeneral(new Runnable()
					{
					    public void run()
						{
						    if (_player._haveFlagCTF)
							{
						        _flagsTaken.set(CTF._teams.indexOf(_teamNameHaveFlagCTF), false);
						        spawnFlag(_teamNameHaveFlagCTF);
						        removeFlagFromPlayer(this);
						        broadcastUserInfo();
						        _haveFlagCTF = false;
						        Announcements(CTF._eventName + "(CTF): " + _teamNameHaveFlagCTF + "'s flag returned.");    		
						        _flagTask.cancel(false);
						        _flagTask = null;
							}
						}
					}, Config.CTF_FLAG_TIMER * 1000);  

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Guest
This topic is now closed to further replies.


×
×
  • Create New...