Use section header util and locale string for plr info cmd
This commit is contained in:
@@ -296,7 +296,7 @@ function getPlayerInfoCommand(command, params, client) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
messagePlayerNormal(client, `{clanOrange}== {jobYellow}Player Info {clanOrange}==============================`);
|
messagePlayerNormal(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderPlayerInfo")));
|
||||||
|
|
||||||
let clan = (getPlayerCurrentSubAccount(targetClient).clan != 0) ? `{ALTCOLOUR}${getClanData(getClanIdFromDatabaseId(getPlayerCurrentSubAccount(targetClient).clan)).name}[${getPlayerCurrentSubAccount(targetClient).clan}] (Rank: ${getClanRankData(getPlayerCurrentSubAccount(targetClient).clan, getPlayerCurrentSubAccount(targetClient).clanRank).name}[Level: ${getClanRankData(getPlayerCurrentSubAccount(targetClient).clan, getPlayerCurrentSubAccount(targetClient).clanRank).level}, DBID: ${getClanRankData(getPlayerCurrentSubAccount(targetClient).clan, getPlayerCurrentSubAccount(targetClient).clanRank).databaseId}` : `(None)`;
|
let clan = (getPlayerCurrentSubAccount(targetClient).clan != 0) ? `{ALTCOLOUR}${getClanData(getClanIdFromDatabaseId(getPlayerCurrentSubAccount(targetClient).clan)).name}[${getPlayerCurrentSubAccount(targetClient).clan}] (Rank: ${getClanRankData(getPlayerCurrentSubAccount(targetClient).clan, getPlayerCurrentSubAccount(targetClient).clanRank).name}[Level: ${getClanRankData(getPlayerCurrentSubAccount(targetClient).clan, getPlayerCurrentSubAccount(targetClient).clanRank).level}, DBID: ${getClanRankData(getPlayerCurrentSubAccount(targetClient).clan, getPlayerCurrentSubAccount(targetClient).clanRank).databaseId}` : `(None)`;
|
||||||
let job = (getPlayerCurrentSubAccount(targetClient).job != 0) ? `{ALTCOLOUR}${getJobData(getJobIdFromDatabaseId(getPlayerCurrentSubAccount(targetClient).job)).name}[${getPlayerCurrentSubAccount(targetClient).job}] (Rank: ${getPlayerCurrentSubAccount(targetClient).jobRank})` : `(None)`;
|
let job = (getPlayerCurrentSubAccount(targetClient).job != 0) ? `{ALTCOLOUR}${getJobData(getJobIdFromDatabaseId(getPlayerCurrentSubAccount(targetClient).job)).name}[${getPlayerCurrentSubAccount(targetClient).job}] (Rank: ${getPlayerCurrentSubAccount(targetClient).jobRank})` : `(None)`;
|
||||||
@@ -352,13 +352,7 @@ function checkPlayerSpawning() {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function showPlayerPrompt(client, promptType, promptMessage, promptTitle, yesButtonText, noButtonText) {
|
function showPlayerPrompt(client, promptMessage, promptTitle, yesButtonText, noButtonText) {
|
||||||
if(promptType == VRR_PROMPT_NONE) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
getPlayerData(client).promptType = promptType;
|
|
||||||
|
|
||||||
if(canPlayerUseGUI(client)) {
|
if(canPlayerUseGUI(client)) {
|
||||||
showPlayerPromptGUI(client, promptMessage, promptTitle, yesButtonText, noButtonText);
|
showPlayerPromptGUI(client, promptMessage, promptTitle, yesButtonText, noButtonText);
|
||||||
} else {
|
} else {
|
||||||
@@ -439,17 +433,17 @@ function gpsCommand(command, params, client) {
|
|||||||
switch(toLowerCase(params)) {
|
switch(toLowerCase(params)) {
|
||||||
case "police":
|
case "police":
|
||||||
case "policestation":
|
case "policestation":
|
||||||
blipColour = "businessBlue"
|
blipColour = "mediumGrey"
|
||||||
locationType = VRR_GPS_TYPE_POLICE;
|
locationType = VRR_GPS_TYPE_POLICE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "hospital":
|
case "hospital":
|
||||||
blipColour = "businessBlue"
|
blipColour = "mediumGrey"
|
||||||
locationType = VRR_GPS_TYPE_HOSPITAL;
|
locationType = VRR_GPS_TYPE_HOSPITAL;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "job":
|
case "job":
|
||||||
blipColour = "businessBlue"
|
blipColour = "mediumGrey"
|
||||||
locationType = VRR_GPS_TYPE_JOB;
|
locationType = VRR_GPS_TYPE_JOB;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -457,7 +451,7 @@ function gpsCommand(command, params, client) {
|
|||||||
case "skins":
|
case "skins":
|
||||||
case "clothes":
|
case "clothes":
|
||||||
case "player":
|
case "player":
|
||||||
blipColour = "businessBlue"
|
blipColour = "mediumGrey"
|
||||||
locationType = VRR_GPS_TYPE_BUSINESS;
|
locationType = VRR_GPS_TYPE_BUSINESS;
|
||||||
useType = VRR_ITEM_USETYPE_SKIN;
|
useType = VRR_ITEM_USETYPE_SKIN;
|
||||||
break;
|
break;
|
||||||
@@ -468,20 +462,20 @@ function gpsCommand(command, params, client) {
|
|||||||
case "weapons":
|
case "weapons":
|
||||||
case "wep":
|
case "wep":
|
||||||
case "weps":
|
case "weps":
|
||||||
blipColour = "businessBlue"
|
blipColour = "mediumGrey"
|
||||||
locationType = VRR_GPS_TYPE_BUSINESS;
|
locationType = VRR_GPS_TYPE_BUSINESS;
|
||||||
useType = VRR_ITEM_USETYPE_WEAPON;
|
useType = VRR_ITEM_USETYPE_WEAPON;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "food":
|
case "food":
|
||||||
case "eat":
|
case "eat":
|
||||||
blipColour = "businessBlue"
|
blipColour = "mediumGrey"
|
||||||
locationType = VRR_GPS_TYPE_BUSINESS;
|
locationType = VRR_GPS_TYPE_BUSINESS;
|
||||||
useType = VRR_ITEM_USETYPE_FOOD;
|
useType = VRR_ITEM_USETYPE_FOOD;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "drink":
|
case "drink":
|
||||||
blipColour = "businessBlue"
|
blipColour = "mediumGrey"
|
||||||
locationType = VRR_GPS_TYPE_BUSINESS;
|
locationType = VRR_GPS_TYPE_BUSINESS;
|
||||||
useType = VRR_ITEM_USETYPE_DRINK;
|
useType = VRR_ITEM_USETYPE_DRINK;
|
||||||
break;
|
break;
|
||||||
@@ -489,7 +483,7 @@ function gpsCommand(command, params, client) {
|
|||||||
case "alcohol":
|
case "alcohol":
|
||||||
case "booze":
|
case "booze":
|
||||||
case "bar":
|
case "bar":
|
||||||
blipColour = "businessBlue"
|
blipColour = "mediumGrey"
|
||||||
locationType = VRR_GPS_TYPE_BUSINESS;
|
locationType = VRR_GPS_TYPE_BUSINESS;
|
||||||
useType = VRR_ITEM_USETYPE_ALCOHOL;
|
useType = VRR_ITEM_USETYPE_ALCOHOL;
|
||||||
break;
|
break;
|
||||||
@@ -499,7 +493,7 @@ function gpsCommand(command, params, client) {
|
|||||||
case "vehrepair":
|
case "vehrepair":
|
||||||
case "spray":
|
case "spray":
|
||||||
case "fix":
|
case "fix":
|
||||||
blipColour = "businessBlue"
|
blipColour = "mediumGrey"
|
||||||
locationType = VRR_GPS_TYPE_BUSINESS;
|
locationType = VRR_GPS_TYPE_BUSINESS;
|
||||||
useType = VRR_ITEM_USETYPE_VEHREPAIR;
|
useType = VRR_ITEM_USETYPE_VEHREPAIR;
|
||||||
break;
|
break;
|
||||||
@@ -508,7 +502,7 @@ function gpsCommand(command, params, client) {
|
|||||||
case "vehcolour":
|
case "vehcolour":
|
||||||
case "carcolour":
|
case "carcolour":
|
||||||
case "colour":
|
case "colour":
|
||||||
blipColour = "businessBlue"
|
blipColour = "mediumGrey"
|
||||||
locationType = VRR_GPS_TYPE_BUSINESS;
|
locationType = VRR_GPS_TYPE_BUSINESS;
|
||||||
useType = VRR_ITEM_USETYPE_VEHCOLOUR;
|
useType = VRR_ITEM_USETYPE_VEHCOLOUR;
|
||||||
break;
|
break;
|
||||||
@@ -517,7 +511,7 @@ function gpsCommand(command, params, client) {
|
|||||||
let itemTypeId = getItemTypeFromParams(params);
|
let itemTypeId = getItemTypeFromParams(params);
|
||||||
if(getItemTypeData(itemTypeId) != false) {
|
if(getItemTypeData(itemTypeId) != false) {
|
||||||
locationType = VRR_GPS_TYPE_BUSINESS;
|
locationType = VRR_GPS_TYPE_BUSINESS;
|
||||||
blipColour = "businessBlue";
|
blipColour = "mediumGrey";
|
||||||
useType = getItemTypeData(itemTypeId).useType;
|
useType = getItemTypeData(itemTypeId).useType;
|
||||||
} else {
|
} else {
|
||||||
let gameLocationId = getGameLocationFromParams(params);
|
let gameLocationId = getGameLocationFromParams(params);
|
||||||
|
|||||||
Reference in New Issue
Block a user