-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.lua
More file actions
28 lines (24 loc) · 874 Bytes
/
server.lua
File metadata and controls
28 lines (24 loc) · 874 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
local VORPcore = {}
TriggerEvent("getCore", function(core)
VORPcore = core
end)
RegisterNetEvent("vorp_core:Server:OnPlayerDeath")
AddEventHandler("vorp_core:Server:OnPlayerDeath", function(killerserverid, causeofdeath)
local _source = source
if killerserverid and killerserverid > 0 and killerserverid ~= _source then
TriggerClientEvent("triggerParticleAndHeal", killerserverid)
end
end)
RegisterServerEvent('PlayerKilled:HealKiller')
AddEventHandler('PlayerKilled:HealKiller', function(killer)
local _source = killer
if _source then
local Player = VORPcore.getUser(_source)
if Player then
local Character = Player.getUsedCharacter
if Character then
TriggerClientEvent("vorp:Tip", _source, "Öldürme bonusu: Can yenilendi!", 3000)
end
end
end
end)