Merge pull request #807 from esx-framework/develop

Sql fix and tweaks
This commit is contained in:
Jean-Baptiste
2023-01-03 21:18:27 +01:00
committed by GitHub
3 changed files with 4 additions and 16 deletions
+1 -13
View File
@@ -710,7 +710,7 @@ INSERT INTO `vehicle_categories` (`name`, `label`) VALUES
--
CREATE TABLE `vehicle_sold` (
`id` INT(11) NOT NULL,
`id` int(11) NOT NULL AUTO_INCREMENT,
`client` varchar(50) NOT NULL,
`model` varchar(50) NOT NULL,
`plate` varchar(50) NOT NULL,
@@ -848,24 +848,12 @@ ALTER TABLE `user_licenses`
ALTER TABLE `vehicle_categories`
ADD PRIMARY KEY (`name`);
--
-- Indexes for table `vehicle_sold`
--
ALTER TABLE `vehicle_sold`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `whitelist`
--
ALTER TABLE `whitelist`
ADD PRIMARY KEY (`identifier`);
--
-- Indexes for table `vehicle_sold`
--
ALTER TABLE `vehicle_sold`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `addon_account_data`
--
+1 -1
View File
@@ -199,7 +199,7 @@ end)
local function loadNPC(index, netID)
CreateThread(function()
while not NetworkDoesEntityExistWithNetworkId(netID) do
Wait(1)
Wait(200)
end
local npc = NetworkGetEntityFromNetworkId(netID)
+2 -2
View File
@@ -1,6 +1,6 @@
RegisterNetEvent('esx:playerLoaded') -- Store the players data
AddEventHandler('esx:playerLoaded', function(xPlayer, isNew)
print("Player Loaded. New | " .. isNew)
print(('Player Loaded. New | %s'):format(isNew))
ESX.PlayerData = xPlayer
ESX.PlayerLoaded = true
end)
@@ -23,7 +23,7 @@ end)
function OnPlayerData(key, val, last)
if type(val) == 'table' then val = json.encode(val) end
print('PlayerData.'..key..' was set to '..val)
print(('PlayerData.%s was set to %s'):format(key, val))
if key == 'job' then
if last.name ~= val.name then
print('You are now in a different job')