Skip to content

[HELP] CTF Flag Timer

Featured Replies

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);  

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.