508/525 Server/Player Message using a event. 508/525
3 posters
Page 1 of 1
508/525 Server/Player Message using a event. 508/525
508/525 Server/Player Message 508/525.
i see some servers who just stick a message in process well thats a bad idea seeing as it keeps on ticking constanly.
This snippet will show u if a player is online. every 5 mins they will get a server/player message.
Player.java.
rs2loginprotocol.java
in ur login method add this.
i see some servers who just stick a message in process well thats a bad idea seeing as it keeps on ticking constanly.
This snippet will show u if a player is online. every 5 mins they will get a server/player message.
Player.java.
- Code:
public int ServerMess;
public void ServerMessage(final Player p) {
EventManager.getSingleton().addEvent(
new Event() {
public void execute(EventContainer c) {
if (p == null || !p.online) {
c.stop();
return;
}
ServerMess++;
if (ServerMess == 5) {
p.getActionSender().sendMessage(p, "Message Here");
}
if (ServerMess == 5) {
ServerMess = 0;
}
}
}, 60000);
};
rs2loginprotocol.java
in ur login method add this.
- Code:
p.ServerMessage(p);
Nathan- Registered Member
- Posts : 3
Join date : 2010-10-30
Re: 508/525 Server/Player Message using a event. 508/525
Good job on this as using proccesses can cause more lagg and this is better soloution therefore gj .
Ix Hybrid Xi- Forum Administrator
- Posts : 43
Join date : 2010-10-06
Re: 508/525 Server/Player Message using a event. 508/525
good job nathan
startcode- Registered Member
- Posts : 14
Join date : 2010-10-07
Similar topics
» error message when tries to play RSPS
» [TUT] Making a player admin on your RSPS [TUT]
» Client/Server Download Rules
» GoF-rs private server | construction | webclient| need STAFFF
» 508/525 Ancient curses 100% switching and icons server sided.
» [TUT] Making a player admin on your RSPS [TUT]
» Client/Server Download Rules
» GoF-rs private server | construction | webclient| need STAFFF
» 508/525 Ancient curses 100% switching and icons server sided.
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum