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

@@ -107,9 +107,8 @@ function createGroundItemObject(itemId) {
setElementRotation(getItemData(itemId).object, getItemTypeData(getItemData(itemId).itemTypeIndex).dropRotation);
setElementOnAllDimensions(getItemData(itemId).object, false);
setElementDimension(getItemData(itemId).object, getItemData(itemId).dimension);
//setEntityData(getItemData(itemId).object, "vrr.scale", getItemTypeData(getItemData(itemId).itemTypeIndex).dropScale, true);
setEntityData(getItemData(itemId).object, "vrr.scale", getItemTypeData(getItemData(itemId).itemTypeIndex).dropScale, true);
addToWorld(getItemData(itemId).object);
//setEntityData(getItemData(itemId).object, "vrr.scale", getItemTypeData(getItemData(itemId).itemTypeIndex).dropScale, true);
getServerData().groundItemCache.push(itemId);
}
@@ -208,6 +207,11 @@ function useItemCommand(command, params, client) {
return false;
}
if(getPlayerData(client).usingSkinSelect) {
messagePlayerError(client, `Your can't use an item while customizing your appearance`);
return false;
}
getPlayerData(client).itemActionState = VRR_ITEM_ACTION_USE;
getPlayerData(client).itemActionItem = hotBarSlot;
showPlayerItemUseDelay(client, hotBarSlot);
@@ -272,6 +276,11 @@ function pickupItemCommand(command, params, client) {
return false;
}
if(getPlayerData(client).usingSkinSelect) {
messagePlayerError(client, `Your can't pick up an item while customizing your appearance`);
return false;
}
getPlayerData(client).itemActionState = VRR_ITEM_ACTION_PICKUP;
getPlayerData(client).itemActionItem = itemId;
showPlayerItemPickupDelay(client, itemId);
@@ -317,6 +326,11 @@ function dropItemCommand(command, params, client) {
return false;
}
if(getPlayerData(client).usingSkinSelect) {
messagePlayerError(client, `Your can't drop an item while customizing your appearance`);
return false;
}
getPlayerData(client).itemActionState = VRR_ITEM_ACTION_DROP;
getPlayerData(client).itemActionItem = hotBarSlot;
showPlayerItemDropDelay(client, hotBarSlot);
@@ -350,6 +364,11 @@ function putItemCommand(command, params, client) {
return false;
}
if(getPlayerData(client).usingSkinSelect) {
messagePlayerError(client, `Your can't store an item while customizing your appearance`);
return false;
}
getPlayerData(client).itemActionItem = hotBarSlot;
getPlayerData(client).itemActionState = VRR_ITEM_ACTION_PUT;
showPlayerItemPutDelay(client, hotBarSlot);
@@ -383,6 +402,11 @@ function takeItemCommand(command, params, client) {
return false;
}
if(getPlayerData(client).usingSkinSelect) {
messagePlayerError(client, `Your can't take an item while customizing your appearance`);
return false;
}
getPlayerData(client).itemActionItem = itemId;
getPlayerData(client).itemActionState = VRR_ITEM_ACTION_TAKE;
showPlayerItemTakeDelay(client, itemId);
@@ -627,6 +651,11 @@ function playerUseItem(client, hotBarSlot) {
if(getDistance(getPlayerPosition(client), getVehiclePosition(vehicle)) <= getGlobalConfig().vehicleRepairDistance) {
meActionToNearbyPlayers(client, `takes their repair kit and fixes the vehicle`);
repairVehicle(vehicle);
getItemData(itemIndex).value = getItemData(itemIndex).value - getItemTypeData(getItemData(itemIndex).itemTypeIndex).useValue;
if(getItemData(itemIndex).value == 0) {
destroyItem(itemIndex);
}
}
break;
@@ -916,7 +945,7 @@ function playerSwitchHotBarSlotCommand(command, params, client) {
}
if(getPlayerData(client).activeHotBarSlot == hotBarSlot) {
return false;
hotBarSlot = -1;
}
if(getPlayerData(client).itemActionState != VRR_ITEM_ACTION_NONE) {
@@ -924,6 +953,11 @@ function playerSwitchHotBarSlotCommand(command, params, client) {
return false;
}
if(getPlayerData(client).usingSkinSelect) {
messagePlayerError(client, `Your can't switch items while customizing your appearance`);
return false;
}
switchPlayerActiveHotBarSlot(client, hotBarSlot);
}