Newbie Spellweaver
- Joined
- Dec 27, 2015
- Messages
- 11
- Reaction score
- 8
Hello members!
I'm new in this section (PB/Blackout DEV) and I decided to work on sources published here. Sorry any shenanigans.. :blink:
First, I'm working on this source: https://forum.ragezone.com/f904/release-updated-database-project-blackout-1072030/
I took a look in this package: (ru.pb.game.network.client.packets.server).
I was looking for any thing like "Show PopUp" or something like that.. and I found SM_SEND_NOTICE . We don't need nothing more haha tt:
Just add this class in ru.pb.game.chat.commands:
SendNoticeAdminCommand.java
and add to AdminCommandHandler (ru.pb.game.handler):
lobby screen:
ingame:
I don't know if all on server can receive this message.. I was testing alone :/ but who can..
Credits to author of this source, i just construct a simple method cya
I'm new in this section (PB/Blackout DEV) and I decided to work on sources published here. Sorry any shenanigans.. :blink:
First, I'm working on this source: https://forum.ragezone.com/f904/release-updated-database-project-blackout-1072030/
I took a look in this package: (ru.pb.game.network.client.packets.server).
I was looking for any thing like "Show PopUp" or something like that.. and I found SM_SEND_NOTICE . We don't need nothing more haha tt:
Just add this class in ru.pb.game.chat.commands:
SendNoticeAdminCommand.java
Code:
package ru.pb.game.chat.commands;
import ru.pb.game.network.client.ClientConnection;
import ru.pb.game.network.client.packets.server.SM_SEND_NOTICE;
/**
* @author Iazzetta
*
*/
public class SendNoticeAdminCommand implements BaseCommand {
@Override
public String getPrefix() {
return "notice";
}
@Override
public String call(ClientConnection conn, String msg) {
try {
String noticeMessage = conn.getPlayer().getName() + ": " + msg; // PLAYER: ...message...
conn.sendPacket(new SM_SEND_NOTICE(noticeMessage));
return "Message sent.";
} catch(Exception e){
return "Correct Command: /adm notice [MESSAGE]";
}
}
}
and add to AdminCommandHandler (ru.pb.game.handler):
Code:
...
commands.add(new SendNoticeAdminCommand());
...
lobby screen:
You must be registered to see links
ingame:
You must be registered to see links
I don't know if all on server can receive this message.. I was testing alone :/ but who can..
Credits to author of this source, i just construct a simple method cya
Last edited: