Renamed column isDead to is_dead

This commit is contained in:
ElPumpo
2018-11-03 23:10:19 +01:00
parent 5410bf75e8
commit 5df6542871
7 changed files with 19 additions and 10 deletions
+1 -1
View File
@@ -296,7 +296,7 @@ AddEventHandler('esx_ambulancejob:revive', function()
DoScreenFadeOut(800)
while not IsScreenFadedOut() do
Citizen.Wait(0)
Citizen.Wait(50)
end
ESX.SetPlayerData('lastPosition', {
+3 -1
View File
@@ -28,4 +28,6 @@ INSERT INTO `items` (name, label, `limit`) VALUES
('medikit','Medikit', 5)
;
ALTER TABLE `users` ADD `isDead` BIT(1) DEFAULT b'0'
ALTER TABLE `users`
ADD `is_dead` TINYINT(1) NULL DEFAULT '0'
;
+3 -1
View File
@@ -28,4 +28,6 @@ INSERT INTO `items` (name, label, `limit`) VALUES
('medikit','Medikit', 5)
;
ALTER TABLE `users` ADD `isDead` BIT(1) DEFAULT b'0'
ALTER TABLE `users`
ADD `is_dead` TINYINT(1) NULL DEFAULT '0'
;
+3 -1
View File
@@ -28,4 +28,6 @@ INSERT INTO `items` (name, label, `limit`) VALUES
('medikit','Medikit', 5)
;
ALTER TABLE `users` ADD `isDead` BIT(1) DEFAULT b'0'
ALTER TABLE `users`
ADD `is_dead` TINYINT(1) NULL DEFAULT '0'
;
+3 -1
View File
@@ -28,4 +28,6 @@ INSERT INTO `items` (name, label, `limit`) VALUES
('medikit','Ensiapupakkaus', 5)
;
ALTER TABLE `users` ADD `isDead` BIT(1) DEFAULT b'0'
ALTER TABLE `users`
ADD `is_dead` TINYINT(1) NULL DEFAULT '0'
;
+3 -1
View File
@@ -28,4 +28,6 @@ INSERT INTO `items` (name, label, `limit`) VALUES
('medikit','Defibrylator', 5)
;
ALTER TABLE `users` ADD `isDead` BIT(1) DEFAULT b'0'
ALTER TABLE `users`
ADD `is_dead` TINYINT(1) NULL DEFAULT '0'
;
+3 -4
View File
@@ -183,10 +183,10 @@ RegisterServerEvent('esx_ambulancejob:firstSpawn')
AddEventHandler('esx_ambulancejob:firstSpawn', function()
local _source = source
local identifier = GetPlayerIdentifiers(_source)[1]
MySQL.Async.fetchScalar('SELECT isDead FROM users WHERE identifier = @identifier', {
MySQL.Async.fetchScalar('SELECT is_dead FROM users WHERE identifier = @identifier', {
['@identifier'] = identifier
}, function(isDead)
if isDead == 1 then
if isDead then
print(('esx_ambulancejob: %s attempted combat logging!'):format(identifier))
TriggerClientEvent('esx_ambulancejob:requestDeath', _source)
end
@@ -197,8 +197,7 @@ RegisterServerEvent('esx_ambulancejob:setDeathStatus')
AddEventHandler('esx_ambulancejob:setDeathStatus', function(isDead)
local identifier = GetPlayerIdentifiers(source)[1]
MySQL.Sync.execute("UPDATE users SET isDead=@isDead WHERE identifier = @identifier",
{
MySQL.Sync.execute('UPDATE users SET is_dead = @isDead WHERE identifier = @identifier', {
['@identifier'] = identifier,
['@isDead'] = isDead
})