Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 00576957e7 | |||
| 5d7b7ac538 |
12
killsay.lua
12
killsay.lua
@@ -626,6 +626,8 @@ function main()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function sampev.onShowTextDraw(id, data)
|
function sampev.onShowTextDraw(id, data)
|
||||||
|
if not imgui_buffers.script_state[0] then return end
|
||||||
|
|
||||||
if id == 2050 and data.text:find(".- %- .- %- KILL") then
|
if id == 2050 and data.text:find(".- %- .- %- KILL") then
|
||||||
local current_time = os.clock()
|
local current_time = os.clock()
|
||||||
recent_textdraws[data.text] = current_time
|
recent_textdraws[data.text] = current_time
|
||||||
@@ -650,20 +652,24 @@ function sampev.onShowTextDraw(id, data)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function sampev.onPlayerDeathNotification(killer_id, victim_id)
|
function sampev.onPlayerDeathNotification(killer_id, victim_id)
|
||||||
|
lua_thread.create(function() wait(0)
|
||||||
|
if not imgui_buffers.script_state[0] then return end
|
||||||
|
|
||||||
if sampIsPlayerConnected(victim_id) then
|
if sampIsPlayerConnected(victim_id) then
|
||||||
local nick = sampGetPlayerNickname(victim_id)
|
local nick = sampGetPlayerNickname(victim_id)
|
||||||
if killer_id == select(2, sampGetPlayerIdByCharHandle(PLAYER_PED)) and not killed_players[nick] then
|
if killer_id == select(2, sampGetPlayerIdByCharHandle(PLAYER_PED)) and not killed_players[nick] then
|
||||||
lua_thread.create(function()
|
|
||||||
killed_players[nick] = true
|
killed_players[nick] = true
|
||||||
killsay(victim_id) wait(1500)
|
killsay(victim_id) wait(1500)
|
||||||
killed_players[nick] = nil
|
killed_players[nick] = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function sampev.onSendGiveDamage(id, damage)
|
function sampev.onSendGiveDamage(id, damage)
|
||||||
|
if not imgui_buffers.script_state[0] then return end
|
||||||
|
|
||||||
if sampIsPlayerConnected(id) then
|
if sampIsPlayerConnected(id) then
|
||||||
local nick = sampGetPlayerNickname(id)
|
local nick = sampGetPlayerNickname(id)
|
||||||
if id == 65535 or killed_players[nick] then return end
|
if id == 65535 or killed_players[nick] then return end
|
||||||
|
|||||||
Reference in New Issue
Block a user