DEATH SYSTEM [ESX]
SQL:
SQL:ALTER TABLE users
ADD COLUMN death TINYINT(1) NOT NULL DEFAULT 0,
ADD COLUMN crawl TINYINT(1) NOT NULL DEFAULT 0;CFG:
CFG:CodeUnity_Death_Cfg = {}
CodeUnity_Death_Cfg.Language = 'en'
CodeUnity_Death_Cfg.EnablePrint = true
CodeUnity_Death_Cfg.Ox_Inventory = true
CodeUnity_Death_Cfg.Translations = {
['en'] = {
['Print_PlayerEnteredWell'] = 'The player %s has entered and is fine',
['Print_PlayerEnteredDeath'] = 'The player %s has entered and is death',
['Print_PlayerEnteredCrawl'] = 'The player %s has entered and is crawn',
['Print_PlayerUpdatedDeath'] = 'Player %s has had his death updated',
['Print_PlayerUpdatedCrawl'] = 'Player %s has had his crawl updated',
['Print_PlayerRespawned'] = 'Player %s has respawned',
['Print_PlayerRevived'] = 'Player %s was revived by %s',
['Command_PlayerRevived_Player'] = 'You were revived by %s with the command',
['Command_PlayerRevived_Staff'] = 'You revived %s with the command',
['Time_To_Die'] = 'You are about to die in: %s seconds',
['Time_To_Respawn'] = 'You will be able to respawn in %s seconds',
['Press_Key_To_Respawn'] = 'Press [~r~%s~w~] to respawn',
['Press_Key_To_Call_Ambulance'] = 'Press [~g~%s~w~] to call the ~g~doctors',
['NotifyForRemoveItemAfterRespawn'] = 'You lost everything because you respawned!'
}
}
CodeUnity_Death_Cfg.Respawn = {
RemoveItemAfterRespawn = true,
NotifyForRemoveItemAfterRespawn = true,
Coords_Respawn = vec4(343.213196, -1398.514282, 31.498169, 48.188972)
}
CodeUnity_Death_Cfg.Commands = {
['Revive'] = { --Don't change this
groups = {
'admin'
},
command = 'revive',
}
}
CodeUnity_Death_Cfg.Keys = {
['Respawn'] = 'E',
['Ambulance'] = 'R',
}
CodeUnity_Death_Cfg.Settings = {
['Death'] = {
Anim = 'drunk_loop',
Dict = 'missarmenian2',
Time_To_Respawn = 50 --Seconds
},
['Before_Crawl'] = {
Anim = 'melee_damage_legs_b',
Dict = 'melee@small_wpn@streamed_core',
Enable = true,
Time = 300
},
['Crawl'] = {
Anim = 'death_b',
Dict = 'combat@death@from_writhe',
Time_To_Die = 30 -- Seconds
},
}
CodeUnity_Death_Cfg.Notify = function (side,notify,src)
if side == 'Client' then
ESX.ShowNotification(notify)
elseif side == 'Server' then
TriggerClientEvent('esx:showNotification', src, notify)
end
end
CodeUnity_Death_Cfg.NotifyAmbulance = function (coords)
--Enter event/exports for notification
end
CodeUnity_Death_Cfg.Addon_Revive = function ()
--used to add triggers etc when you are revived
endLast updated