Use some more locale strings

This commit is contained in:
Vortrex
2022-05-30 07:37:52 -05:00
parent 1722eafa6f
commit ea49a41c45

View File

@@ -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;
}