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:
@@ -752,13 +752,15 @@ function getClanFromParams(params) {
|
||||
function getClanRankFromParams(clanId, params) {
|
||||
if(isNaN(params)) {
|
||||
for(let i in getClanData(clanId).ranks) {
|
||||
if(toLowerCase(getClanData(clanId).ranks[i].name).indexOf(toLowerCase(params)) != -1) {
|
||||
if((toLowerCase(getClanData(clanId).ranks[i].name).indexOf(toLowerCase(params)) != -1)) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if(typeof getClanData(clanId).ranks[params] != "undefined") {
|
||||
return toInteger(params);
|
||||
for(let i in getClanData(clanId).ranks) {
|
||||
if(getClanData(clanId).ranks[i].level == toInteger(params)) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1535,4 +1537,23 @@ function getAllHousesOwnedByPlayer(client) {
|
||||
return getServerData().houses.filter((h) => h.ownerType == VRR_HOUSEOWNER_PLAYER && h.ownerId == getPlayerCurrentSubAccount(client).databaseId);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function addPositiveNegativeSymbol(value) {
|
||||
return (value >= 0) ? `+${value}` : `${value}`;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getCurrentTimeStampWithTimeZone(timeZone) {
|
||||
let date = new Date();
|
||||
|
||||
let utcDate = new Date(date.toLocaleString('en-US', { timeZone: "UTC" }));
|
||||
let tzDate = new Date(date.toLocaleString('en-US', { timeZone: timeZone }));
|
||||
let offset = utcDate.getTime() - tzDate.getTime();
|
||||
|
||||
date.setTime( date.getTime() + offset );
|
||||
|
||||
return date;
|
||||
};
|
||||
// ===========================================================================
|
||||
Reference in New Issue
Block a user