Mafia Connected support

This commit is contained in:
Vortrex
2021-08-14 20:49:47 -05:00
parent ebd8a91c87
commit 4fe9c45e0a
39 changed files with 2084 additions and 1669 deletions

View File

@@ -83,7 +83,7 @@ function renderPropertyEntranceLabel(name, position, locked, isBusiness, price,
tempPosition.z = tempPosition.z + propertyLabelHeight;
let screenPosition = getScreenFromWorldPosition(tempPosition);
if(screenPosition.x < 0 || screenPosition.x > gta.width) {
if(screenPosition.x < 0 || screenPosition.x > game.width) {
return false;
}
@@ -160,7 +160,7 @@ function renderPropertyExitLabel(position) {
tempPosition.z = tempPosition.z + propertyLabelHeight;
let screenPosition = getScreenFromWorldPosition(tempPosition);
if(screenPosition.x < 0 || screenPosition.x > gta.width) {
if(screenPosition.x < 0 || screenPosition.x > game.width) {
return false;
}
@@ -188,7 +188,7 @@ function renderJobLabel(name, position, jobType) {
tempPosition.z = tempPosition.z + propertyLabelHeight;
let screenPosition = getScreenFromWorldPosition(tempPosition);
if(screenPosition.x < 0 || screenPosition.x > gta.width) {
if(screenPosition.x < 0 || screenPosition.x > game.width) {
return false;
}
@@ -220,7 +220,7 @@ function renderJobLabel(name, position, jobType) {
// -------------------------------------------------------------------------
function processLabelRendering() {
if(renderLabels && gta.game != GAME_GTA_IV) {
if(renderLabels && areWorldLabelsSupported()) {
if(localPlayer != null) {
let pickups = getElementsByType(ELEMENT_PICKUP);
for(let i in pickups) {