From ea49a41c45afd7c9d2a212a77c9e0a038426640a Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Mon, 30 May 2022 07:37:52 -0500 Subject: [PATCH] Use some more locale strings --- scripts/server/chat.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/scripts/server/chat.js b/scripts/server/chat.js index 8bc9223b..06a3f921 100644 --- a/scripts/server/chat.js +++ b/scripts/server/chat.js @@ -18,22 +18,22 @@ function initChatScript() { function processPlayerChat(client, messageText) { if(!isConsole(client)) { if(!getPlayerData(client)) { - messagePlayerError(client, "You need to login before you can chat!"); + messagePlayerError(client, getLocaleString(client, "MustBeLoggedInAndSpawnedToChat")); return false; } if(!isPlayerLoggedIn(client)) { - messagePlayerError(client, "You need to login before you can chat!"); + messagePlayerError(client, getLocaleString(client, "MustBeLoggedInAndSpawnedToChat")); return false; } if(!isPlayerSpawned(client)) { - messagePlayerError(client, "You need to spawn before you can chat!"); + messagePlayerError(client, getLocaleString(client, "MustBeLoggedInAndSpawnedToChat")); return false; } if(isPlayerMuted(client)) { - messagePlayerError(client, "You are muted and can't chat!"); + messagePlayerError(client, getLocaleString(client, "MutedCantChat")); return false; } @@ -74,7 +74,7 @@ function meActionCommand(command, params, client) { function doActionCommand(command, params, client) { if(isPlayerMuted(client)) { - messagePlayerError(client, "You are muted and can't chat!"); + messagePlayerError(client, getLocaleString(client, "MutedCantChat")); return false; } @@ -91,7 +91,7 @@ function doActionCommand(command, params, client) { function shoutCommand(command, params, client) { if(isPlayerMuted(client)) { - messagePlayerError(client, "You are muted and can't chat!"); + messagePlayerError(client, getLocaleString(client, "MutedCantChat")); return false; } @@ -108,7 +108,7 @@ function shoutCommand(command, params, client) { function megaphoneChatCommand(command, params, client) { if(isPlayerMuted(client)) { - messagePlayerError(client, "You are muted and can't chat!"); + messagePlayerError(client, getLocaleString(client, "MutedCantChat")); return false; } @@ -118,7 +118,7 @@ function megaphoneChatCommand(command, params, client) { } if(!canPlayerUseMegaphone(client)) { - messagePlayerError(client, "You must have a megaphone item or be in an emergency vehicle!"); + messagePlayerError(client, getLocaleString(client, "CantUseMegaphone")); return false; } @@ -130,7 +130,7 @@ function megaphoneChatCommand(command, params, client) { function talkCommand(command, params, client) { if(isPlayerMuted(client)) { - messagePlayerError(client, "You are muted and can't chat!"); + messagePlayerError(client, getLocaleString(client, "MutedCantChat")); return false; } @@ -147,7 +147,7 @@ function talkCommand(command, params, client) { function whisperCommand(command, params, client) { if(isPlayerMuted(client)) { - messagePlayerError(client, "You are muted and can't chat!"); + messagePlayerError(client, getLocaleString(client, "MutedCantChat")); return false; } @@ -164,7 +164,7 @@ function whisperCommand(command, params, client) { function adminChatCommand(command, params, client) { if(isPlayerMuted(client)) { - messagePlayerError(client, "You are muted and can't chat!"); + messagePlayerError(client, getLocaleString(client, "MutedCantChat")); return false; } @@ -180,7 +180,7 @@ function adminChatCommand(command, params, client) { function clanChatCommand(command, params, client) { if(isPlayerMuted(client)) { - messagePlayerError(client, "You are muted and can't chat!"); + messagePlayerError(client, getLocaleString(client, "MutedCantChat")); return false; }