Use normal chat for now
This commit is contained in:
@@ -46,6 +46,7 @@ function unBindChatBoxKeys() {
|
||||
// ===========================================================================
|
||||
|
||||
function receiveChatBoxMessageFromServer(messageString, colour) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.ChatBox]: Received chatbox message from server: ${messageString}`);
|
||||
let colouredString = replaceColoursInMessage(messageString);
|
||||
|
||||
if(bottomMessageIndex >= chatBoxHistory.length-1) {
|
||||
|
||||
@@ -225,3 +225,10 @@ function onCameraProcess(event) {
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function onChatOutput(event, messageText, colour) {
|
||||
//event.preventDefault();
|
||||
//receiveChatBoxMessageFromServer(messageText, colour);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -16,27 +16,32 @@ function initChatScript() {
|
||||
// ===========================================================================
|
||||
|
||||
function processPlayerChat(client, messageText) {
|
||||
if(!getPlayerData(client)) {
|
||||
messagePlayerError(client, "You need to login before you can chat!");
|
||||
return false;
|
||||
}
|
||||
if(!isConsole(client)) {
|
||||
if(!getPlayerData(client)) {
|
||||
messagePlayerError(client, "You need to login before you can chat!");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!isPlayerLoggedIn(client)) {
|
||||
messagePlayerError(client, "You need to login before you can chat!");
|
||||
return false;
|
||||
}
|
||||
if(!isPlayerLoggedIn(client)) {
|
||||
messagePlayerError(client, "You need to login before you can chat!");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!isPlayerSpawned(client)) {
|
||||
messagePlayerError(client, "You need to spawn before you can chat!");
|
||||
return false;
|
||||
}
|
||||
if(!isPlayerSpawned(client)) {
|
||||
messagePlayerError(client, "You need to spawn before you can chat!");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(isPlayerMuted(client)) {
|
||||
messagePlayerError(client, "You are muted and can't chat!");
|
||||
return false;
|
||||
}
|
||||
if(isPlayerMuted(client)) {
|
||||
messagePlayerError(client, "You are muted and can't chat!");
|
||||
return false;
|
||||
}
|
||||
|
||||
messageText = messageText.substring(0, 128);
|
||||
messageText = messageText.substring(0, 128);
|
||||
messagePlayerNormal(null, `💬 ${getCharacterFullName(client)}: ${messageText}`);
|
||||
} else {
|
||||
messagePlayerNormal(null, `🛡️ (ADMIN) - ${messageText}`);
|
||||
}
|
||||
|
||||
/*
|
||||
let clients = getClients();
|
||||
@@ -48,7 +53,7 @@ function processPlayerChat(client, messageText) {
|
||||
messagePlayerNormal(clients[i], `💬 ${getCharacterFullName(client)}: [#FFFFFF]${translatedText}${original}`, clients[i], getColourByName("mediumGrey"));
|
||||
}
|
||||
*/
|
||||
messagePlayerNormal(null, `💬 ${getCharacterFullName(client)}: ${messageText}`);
|
||||
|
||||
//messageDiscordChatChannel(`💬 ${getCharacterFullName(client)}: ${messageText}`);
|
||||
}
|
||||
|
||||
|
||||
@@ -520,9 +520,8 @@ function sendPlayerRemoveFromVehicle(client) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function sendChatBoxMessageToPlayer(client, message, colour) {
|
||||
sendNetworkEventToPlayer("vrr.m", client, message, colour)
|
||||
//messageClient(message, client, colour);
|
||||
function sendChatBoxMessageToPlayer(client, messageText, colour) {
|
||||
messageClient(messageText, client, colour);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
@@ -37,7 +37,15 @@ function messagePlayerNormal(client, messageText, colour = COLOUR_WHITE) {
|
||||
// logToConsole(LOG_INFO, `${removeColoursInMessage(messageText)}`);
|
||||
//}
|
||||
|
||||
sendChatBoxMessageToPlayer(client, messageText, colour);
|
||||
messageText = replaceColoursInMessage(messageText);
|
||||
|
||||
if(client == null) {
|
||||
message(messageText, colour);
|
||||
} else {
|
||||
messageClient(messageText, client, colour);
|
||||
}
|
||||
|
||||
//sendChatBoxMessageToPlayer(client, messageText, colour);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user