BBS-OnlinePK
Would you like to react to this message? Create an account in a few clicks or log in to continue.



 
HomeSearchLatest imagesRegisterLog in

 

 How to add a clock to your server

Go down 
AuthorMessage
Richard
Street Tramp
Richard


Posts : 157
Awesomeness : 0
Join date : 2009-09-07
Age : 33

How to add a clock to your server Empty
PostSubject: How to add a clock to your server   How to add a clock to your server Icon_minitimeMon Sep 14, 2009 4:07 pm

Difficulty 1/10 (c&p)

Use: Add a clock to the top of your game window

Files modified: client.java

Replace your writePlayers() method with this:
Code:

public void writePlayers() {
int players = PlayerHandler.getPlayerCount();
Calendar cal = new GregorianCalendar();
int hour24 = cal.get(Calendar.HOUR_OF_DAY);
int min = cal.get(Calendar.MINUTE);
int sec = cal.get(Calendar.SECOND);
int timeHour = 0;
int timeMin = 0;
if(hour24 <= 12) {
timeHour = hour24;
timeMin = min;
sendFrame126("@gre@        Online:@whi@ "+players, 174);
if(min >= 0 && min <= 9) {
sendFrame126("@gre@            "+timeHour+":0"+timeMin+" AM", 6570);
}
else {
sendFrame126("@gre@            "+timeHour+":"+timeMin+" AM", 6570);
}
sendFrame126("  ", 6572);
sendFrame126("  ", 6664);
setInterfaceWalkable(6673);
}
else {
timeHour = hour24-12;
timeMin = min;
sendFrame126("@gre@        Online:@whi@ "+players, 174);
if(min >= 0 && min <= 9) {
sendFrame126("@gre@            "+timeHour+":0"+timeMin+" PM", 6570);
}
else {
sendFrame126("@gre@            "+timeHour+":"+timeMin+" PM", 6570);
}
sendFrame126("  ", 6572);
sendFrame126("  ", 6664);
setInterfaceWalkable(6673);
}
}
You can change the frame of the time and the players online or completely remove the online players part, if you know any Java at all only attempt this, otherwise don't try it unless you want to **** up your shit.

Credits: Newton3788
Back to top Go down
http://Quarion.org
 
How to add a clock to your server
Back to top 
Page 1 of 1
 Similar topics
-
» A server request
» How to make a runescape server
» Estimated time left until server goes non-hamachi...

Permissions in this forum:You cannot reply to topics in this forum
BBS-OnlinePK :: Off Topic :: Development of RSPS :: 317 Source Work :: Guides-
Jump to: