Lots of fixes + clans

* Added clans
* Fixed interior exit labels
* Disabled nametags on games without 3D label support
* Fixed mouse cursor toggle command
* Fixed SA fight-style not being applied
* Added manageRanks clan permission bitflag
* Added interior lights toggle
* Fixed clan chat
* Added real-time support with optional timezone offset
* Added lots of JSDoc stuff
* Added command for managers to set server GUI colour
* Added GeoIP command for admins
* Added command for admins to force an immediate payday
* Added admins gotospawn command
* Added return player command for teleported players
* Added pizza delivery job const
* Fixed biz/house set pickup & interior type
* Fixed inventory showing ammo count for melee weapons
* Fixed SA using wrong pickup types
* Fixed char select screen breaking when in a clan
* Added +/- symbol util for number display
* Added get current timestamp for timezone offset util
* Fixed vehicle owner ID being set wrong for job veh
This commit is contained in:
Vortrex
2021-09-09 01:37:04 -05:00
parent 7b0fa01d03
commit 9c87ff950c
28 changed files with 835 additions and 165 deletions

View File

@@ -819,11 +819,20 @@ function playerSwitchItem(client, newHotBarSlot) {
logToConsole(LOG_DEBUG, `[VRR.Item] ${getPlayerDisplayForConsole(client)} switched from hotbar slot ${currentHotBarSlot} to ${newHotBarSlot}`);
let currentHotBarItem = -1;
let newHotBarItem = -1;
// Check if new slot is the same as the current one
// If true, clear active item slot (puts current item away)
if(currentHotBarSlot != -1 && newHotBarSlot != -1) {
if(currentHotBarSlot == newHotBarSlot) {
newHotBarSlot = -1;
}
}
if(currentHotBarSlot != -1) {
currentHotBarItem = getPlayerData(client).hotBarItems[currentHotBarSlot];
}
let newHotBarItem = -1;
if(newHotBarSlot != -1) {
newHotBarItem = getPlayerData(client).hotBarItems[newHotBarSlot];
}
@@ -1363,6 +1372,9 @@ function getItemValueDisplay(itemType, value) {
} else if(getItemTypeData(itemType).useType == VRR_ITEM_USETYPE_PHONE) {
return toString(value);
} else if(getItemTypeData(itemType).useType == VRR_ITEM_USETYPE_WEAPON || getItemTypeData(itemType).useType == VRR_ITEM_USETYPE_TAZER) {
if(isMeleeWeapon(getItemTypeData(itemType).useId)) {
return false;
}
return toString(value)+" rounds";
} else if(getItemTypeData(itemType).useType == VRR_ITEM_USETYPE_WALKIETALKIE) {
return toString(toString(value).slice(0,-2)+"."+toString(value).slice(-1)+"MHz");
@@ -1371,7 +1383,7 @@ function getItemValueDisplay(itemType, value) {
} else {
return value;
}
return "unknown";
return false;
}
// ===========================================================================