Bunch of changes (see description)

* New script files to organize GUI
* Added clientside pickup detection to reduce server load for enter/exit
* Added notips command for players to toggle random tips
* Select account last IP as part of wildcard (was separate due to old INT)
* Save account registration with datetime instead of unix timestamp
* Don't force mouse camera on moving anims in SA+
* Add IP ban to server runtime memory in subnet ban command
* Add non-roleplay character name account moderation flag
* Fix bizowner and bizclan commands
* Fix bug that allowed buying items without having the needed cash
* Fix set biz blip command
* Add dealership help label type command
* Added command to show all clan flag types
* Added discord config and load from database
* Fix angle for directional teleport and anim move directions
* Use new colour structure in preparation for locale translations
* Add on-foot only item usetype array to prevent using when in veh
* Fix wrong const value for exit pickup type
* Start using datetime in MySQL tables instead of unix timestamps
* Start adding webhooks for discord (unfinished)
* Added new discord URL to discord help category
* Added house reset pickups/blips utils
* Prevent using items when in skin selector
* Fix get player command
* Fix give player money command
* Add coffee shop and vehicle repair shop default biz item templates
* Remove old game fixes util (resource now in server config)
* Fix bug where characters in clans wouldn't be shown in char select
* Slimmed down the amount of timers
* Made some potentially large numbers more readable (commas)
* Remove colours in message for console output
This commit is contained in:
Vortrex
2021-09-28 11:41:33 -05:00
parent b19b35368d
commit 9d8d5d1418
48 changed files with 1804 additions and 1154 deletions

View File

@@ -3133,12 +3133,12 @@ let gameData = {
ammunation: 20,
payAndSpray: 18,
vehicleDealership: 6,
restaurant: -1,
fastFood: -1,
restaurant: 0,
fastFood: 0,
bank: 0,
fuelStation: -1,
business: -1,
house: -1,
fuelStation: 0,
business: 0,
house: 0,
},
{ // GTA VC
policeStation: 0,
@@ -3147,12 +3147,12 @@ let gameData = {
ammunation: 16,
payAndSpray: 27,
vehicleDealership: 7,
restaurant: -1,
fastFood: -1,
restaurant: 0,
fastFood: 0,
bank: 0,
fuelStation: -1,
business: -1,
house: -1,
fuelStation: 0,
business: 0,
house: 0,
},
{ // GTA SA
policeStation: 30,
@@ -3164,14 +3164,14 @@ let gameData = {
airplaneDealership: 5,
boatDealership: 9,
restaurant: 50,
fastFood: -1,
fastFood: 0,
clothes: 45,
pizza: 29,
chicken: 14,
burger: 10,
bank: 52,
gasStation: 17,
business: -1,
business: 0,
house: 31,
bar: 49,
club: 48,
@@ -3182,32 +3182,21 @@ let gameData = {
job: 56,
},
{ // GTA UG
policeStation: 8,
fireStation: 9,
hospital: 12,
ammunation: 20,
payAndSpray: 18,
vehicleDealership: 6,
restaurant: -1,
fastFood: -1,
bank: 52,
fuelStation: 0,
business: -1,
house: -1,
},
{ // GTA IV
policeStation: 8,
fireStation: 9,
hospital: 12,
ammunation: 20,
policeStation: 60,
fireStation: 61,
hospital: 62,
ammunation: 59,
payAndSpray: 18,
vehicleDealership: 6,
restaurant: -1,
fastFood: -1,
restaurant: 57,
fastFood: 21,
bank: 52,
fuelStation: 0,
business: -1,
house: -1,
business: 0,
house: 29,
},
],
pickupModels: [
@@ -3502,6 +3491,27 @@ let gameData = {
["Hot Wings", 500, 2],
["Bottle of Soda", 500, 2],
],
coffeeDonutShop: [
["Glazed Donut", 500, 2],
["Frosted Donut", 500, 2],
["Jelly Donut", 500, 2],
["Cream-filled Donut", 500, 2],
["Apple Fritter", 500, 2],
["Pumpkin Spice Latte", 500, 2],
["Mocha Latte", 500, 2],
["Iced Coffee", 500, 2],
["Large Coffee", 500, 2],
["Small Coffee", 500, 2],
],
vehicleRepairShop: [
["Vehicle Repair Kit", 500, 2],
["Vehicle Decal Kit", 500, 2],
["Vehicle Primary Colour Kit", 500, 2],
["Vehicle Secondary Colour Kit", 500, 2],
//["Vehicle NOS Kit", 500, 2],
//["Vehicle Hydraulics Kit", 500, 2],
//["Vehicle Body Part Kit", 500, 2],
],
},
{
clothingStore: [
@@ -3615,6 +3625,27 @@ let gameData = {
["Hot Wings", 500, 2],
["Bottle of Soda", 500, 2],
],
coffeeDonutShop: [
["Glazed Donut", 500, 2],
["Frosted Donut", 500, 2],
["Jelly Donut", 500, 2],
["Cream-filled Donut", 500, 2],
["Apple Fritter", 500, 2],
["Pumpkin Spice Latte", 500, 2],
["Mocha Latte", 500, 2],
["Iced Coffee", 500, 2],
["Large Coffee", 500, 2],
["Small Coffee", 500, 2],
],
vehicleRepairShop: [
["Vehicle Repair Kit", 500, 2],
["Vehicle Decal Kit", 500, 2],
["Vehicle Primary Colour Kit", 500, 2],
["Vehicle Secondary Colour Kit", 500, 2],
//["Vehicle NOS Kit", 500, 2],
//["Vehicle Hydraulics Kit", 500, 2],
//["Vehicle Body Part Kit", 500, 2],
],
},
{
clothingStore: [
@@ -3735,6 +3766,28 @@ let gameData = {
["Hot Wings", 500, 2],
["Bottle of Soda", 500, 2],
],
coffeeDonutShop: [
["Glazed Donut", 500, 2],
["Frosted Donut", 500, 2],
["Jelly Donut", 500, 2],
["Cream-filled Donut", 500, 2],
["Apple Fritter", 500, 2],
["Pumpkin Spice Latte", 500, 2],
["Mocha Latte", 500, 2],
["Iced Coffee", 500, 2],
["Apple Fritter", 500, 2],
["Large Coffee", 500, 2],
["Small Coffee", 500, 2],
],
vehicleRepairShop: [
["Vehicle Repair Kit", 500, 2],
["Vehicle Decal Kit", 500, 2],
["Vehicle Primary Colour Kit", 500, 2],
["Vehicle Secondary Colour Kit", 500, 2],
//["Vehicle NOS Kit", 500, 2],
//["Vehicle Hydraulics Kit", 500, 2],
//["Vehicle Body Part Kit", 500, 2],
],
}
],
interiorTemplates: [
@@ -4328,7 +4381,9 @@ function setPlayerDimension(client, dimension) {
function setPlayerInterior(client, interior) {
logToConsole(LOG_DEBUG, `Setting ${getPlayerDisplayForConsole(client)}'s interior to ${interior}`);
sendPlayerSetInterior(client, interior);
getPlayerCurrentSubAccount(client).interior = interior;
if(isPlayerLoggedIn(client) && isPlayerSpawned(client)) {
getPlayerCurrentSubAccount(client).interior = interior;
}
}
// ===========================================================================
@@ -4402,6 +4457,7 @@ function getVehicleForNetworkEvent(vehicle) {
function deleteGameElement(element) {
logToConsole(LOG_DEBUG, `Destroying game element ${element.id} (Type: ${element.type})`);
if(element != null) {
//removeFromWorld(element);
destroyElement(element);
return true;
}
@@ -4464,7 +4520,11 @@ function getPlayerArmour(client) {
// ===========================================================================
function setPlayerCash(client, amount) {
if(typeof amount != "number") {
if(client == null) {
return false;
}
if(isNan(amount)) {
return false;
}
@@ -4475,7 +4535,11 @@ function setPlayerCash(client, amount) {
// ===========================================================================
function givePlayerCash(client, amount) {
if(typeof amount != "number") {
if(client == null) {
return false;
}
if(isNan(amount)) {
return false;
}
@@ -4486,7 +4550,11 @@ function givePlayerCash(client, amount) {
// ===========================================================================
function takePlayerCash(client, amount) {
if(typeof amount != "number") {
if(client == null) {
return false;
}
if(isNan(amount)) {
return false;
}