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

@@ -49,6 +49,8 @@ function onPlayerJoin(event, client) {
if(isFadeCameraSupported()) {
fadeCamera(client, true, 1.0);
}
messageDiscordEventChannel(`:waving: ${getPlayerDisplayForConsole(client)} has joined the server.`);
}
// ===========================================================================
@@ -76,6 +78,8 @@ function onPlayerQuit(event, client, quitReasonId) {
resetClientStuff(client);
getServerData().clients[client.index] = null;
}
messageDiscordEventChannel(`${getPlayerDisplayForConsole(client)} has left the server.`);
}
// ===========================================================================
@@ -104,8 +108,8 @@ function onPlayerChat(event, client, messageText) {
}
messageText = messageText.substring(0, 128);
messagePlayerNormal(null, `${getInlineChatColourByName("white")}💬 [${hexFromToColour(getPlayerColour(client))}]${getCharacterFullName(client)}: ${getInlineChatColourByName("white")}${messageText}`, getPlayerColour(client));
messagePlayerNormal(null, replaceColoursInMessage(`${getInlineChatColourByName("white")}💬 [${hexFromToColour(getPlayerColour(client))}]${getCharacterFullName(client)}: ${getInlineChatColourByName("white")}${messageText}`), getPlayerColour(client));
messageDiscordChatChannel(`💬 ${getCharacterFullName(client)}: ${messageText}`);
}
// ===========================================================================
@@ -260,7 +264,7 @@ async function onPlayerEnteredVehicle(client, clientVehicle, seat) {
ownerType = toLowerCase(getVehicleOwnerTypeText(getVehicleData(vehicle).ownerType));
switch(getVehicleData(vehicle).ownerType) {
case VRR_VEHOWNER_CLAN:
ownerName = getClanData(getVehicleData(vehicle).ownerId).name;
ownerName = getClanData(getClanIdFromDatabaseId(getVehicleData(vehicle).ownerId)).name;
ownerType = "clan";
break;
@@ -365,7 +369,7 @@ function onPlayerDeath(client, position) {
setTimeout(function() {
if(getPlayerCurrentSubAccount(client).inJail) {
let closestJail = getClosestJail(getPlayerPosition(client));
//client.despawnPlayer();
client.despawnPlayer();
getPlayerCurrentSubAccount(client).interior = closestJail.interior;
getPlayerCurrentSubAccount(client).dimension = closestJail.dimension;
if(getServerGame() == GAME_GTA_IV) {
@@ -380,7 +384,7 @@ function onPlayerDeath(client, position) {
updatePlayerSpawnedState(client, true);
} else {
let closestHospital = getClosestHospital(getPlayerPosition(client));
//client.despawnPlayer();
client.despawnPlayer();
getPlayerCurrentSubAccount(client).interior = closestHospital.interior;
getPlayerCurrentSubAccount(client).dimension = closestHospital.dimension;
if(getServerGame() == GAME_GTA_IV) {
@@ -566,16 +570,6 @@ function onPlayerSpawn(client) {
updatePlayerCash(client);
getPlayerData(client).payDayTickStart = sdl.ticks;
if(getPlayerCurrentSubAccount(client).inBusiness > 0) {
setEntityData(client.player, "vrr.inBusiness", getBusinessIdFromDatabaseId(getPlayerCurrentSubAccount(client).inBusiness), true);
}
if(getPlayerCurrentSubAccount(client).inHouse > 0) {
setEntityData(client.player, "vrr.inHouse", getHouseIdFromDatabaseId(getPlayerCurrentSubAccount(client).inHouse), true);
}
//}
}