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:
@@ -201,7 +201,7 @@ function createSubAccount(accountId, firstName, lastName) {
|
||||
let safeFirstName = escapeDatabaseString(dbConnection, firstName);
|
||||
let safeLastName = escapeDatabaseString(dbConnection, lastName);
|
||||
|
||||
dbQuery = queryDatabase(dbConnection, `INSERT INTO sacct_main (sacct_acct, sacct_name_first, sacct_name_last, sacct_pos_x, sacct_pos_y, sacct_pos_z, sacct_rot_z, sacct_cash, sacct_server, sacct_health, sacct_when_made, sacct_when_lastlogin) VALUES (${accountId}, '${safeFirstName}', '${safeLastName}', ${getServerConfig().newCharacter.spawnPosition.x}, ${getServerConfig().newCharacter.spawnPosition.y}, ${getServerConfig().newCharacter.spawnPosition.z}, ${getServerConfig().newCharacter.spawnHeading}, ${getServerConfig().newCharacter.money}, ${getServerId()}, 100, UNIX_TIMESTAMP(), 0)`);
|
||||
dbQuery = queryDatabase(dbConnection, `INSERT INTO sacct_main (sacct_acct, sacct_name_first, sacct_name_last, sacct_pos_x, sacct_pos_y, sacct_pos_z, sacct_rot_z, sacct_cash, sacct_server, sacct_health, sacct_when_made, sacct_when_lastlogin) VALUES (${accountId}, '${safeFirstName}', '${safeLastName}', ${getServerConfig().newCharacter.spawnPosition.x}, ${getServerConfig().newCharacter.spawnPosition.y}, ${getServerConfig().newCharacter.spawnPosition.z}, ${getServerConfig().newCharacter.spawnHeading}, ${getServerConfig().newCharacter.money}, ${getServerId()}, 100, CURRENT_TIMESTAMP(), 0)`);
|
||||
//if(dbQuery) {
|
||||
if(getDatabaseInsertId(dbConnection) > 0) {
|
||||
let dbInsertId = getDatabaseInsertId(dbConnection);
|
||||
@@ -250,7 +250,7 @@ function showCharacterSelectToClient(client) {
|
||||
messagePlayerNormal(client, `You have the following characters. Use /usechar <id> to select one:`, getColourByName("teal"));
|
||||
getPlayerData(client).subAccounts.forEach(function(subAccount, index) {
|
||||
let tempSubAccount = getPlayerData(client).subAccounts[0];
|
||||
let clanName = (tempSubAccount.clan != 0) ? getClanData(tempSubAccount.clan).name : "None";
|
||||
let clanName = (tempSubAccount.clan != 0) ? getClanData(getClanIdFromDatabaseId(tempSubAccount.clan)).name : "None";
|
||||
let lastPlayedText = (tempSubAccount.lastLogin != 0) ? `${msToTime(getCurrentUnixTimestamp()-tempSubAccount.lastLogin)} ago` : "Never";
|
||||
messagePlayerNormal(client, `${index+1} • [#BBBBBB]${subAccount.firstName} ${subAccount.lastName} ($${tempSubAccount.cash}, ${lastPlayedText})`);
|
||||
});
|
||||
@@ -320,7 +320,7 @@ function checkPreviousCharacter(client) {
|
||||
let subAccountId = getPlayerData(client).currentSubAccount;
|
||||
let tempSubAccount = getPlayerData(client).subAccounts[subAccountId];
|
||||
|
||||
let clanName = (tempSubAccount.clan != 0) ? getClanData(tempSubAccount.clan).name : "None";
|
||||
let clanName = (tempSubAccount.clan != 0) ? getClanData(getClanIdFromDatabaseId(tempSubAccount.clan)).name : "None";
|
||||
let lastPlayedText = (tempSubAccount.lastLogin != 0) ? `${getTimeDifferenceDisplay(tempSubAccount.lastLogin, getCurrentUnixTimestamp())} ago` : "Never";
|
||||
showPlayerCharacterSelectGUI(client, tempSubAccount.firstName, tempSubAccount.lastName, tempSubAccount.cash, clanName, lastPlayedText, tempSubAccount.skin);
|
||||
|
||||
@@ -341,7 +341,7 @@ function checkNextCharacter(client) {
|
||||
let subAccountId = getPlayerData(client).currentSubAccount;
|
||||
let tempSubAccount = getPlayerData(client).subAccounts[subAccountId];
|
||||
|
||||
let clanName = (tempSubAccount.clan != 0) ? getClanData(tempSubAccount.clan).name : "None";
|
||||
let clanName = (tempSubAccount.clan != 0) ? getClanData(getClanIdFromDatabaseId(tempSubAccount.clan)).name : "None";
|
||||
let lastPlayedText = (tempSubAccount.lastLogin != 0) ? `${getTimeDifferenceDisplay(tempSubAccount.lastLogin, getCurrentUnixTimestamp())} ago` : "Never";
|
||||
showPlayerCharacterSelectGUI(client, tempSubAccount.firstName, tempSubAccount.lastName, tempSubAccount.cash, clanName, lastPlayedText, tempSubAccount.skin);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user