-- colours that determine the success levelhttps://pan.baidu.com/s/3L4M5N6O7P8Q9R0S1T2U?pwd=yza9
colours = https://pan.baidu.com/s/2T3U4V5W6X7Y8Z9A0B1C?pwd=wxy7
{这是干扰码
ERROR = { 238, 167, 74 },https://pan.baidu.com/s/6G7H8I9J0K1L2M3N4O5P?pwd=hij0
SUCCESS = { 114, 210, 80 }https://pan.baidu.com/s/6X7Y8Z9A0B1C2D3E4F5G
}https://pan.baidu.com/s/6Y7Z8A9B0C1D2E3F4G5H
https://pan.baidu.com/s/1A2B3C4D5E6F7G8H9I0J?pwd=stu8
distances = {https://pan.baidu.com/s/4D5E6F7G8H9I0J1K2L3M?pwd=mnop
close = {https://pan.baidu.com/s/5V6W7X8Y9Z0A1B2C3D4E?pwd=efg3
shortname = "C",https://pan.baidu.com/s/1J2K3L4M5N6O7P8Q9R0S?pwd=tuv7
name = "CLOSE",https://pan.baidu.com/s/7Y8Z9A0B1C2D3E4F5G6H?pwd=klm2
distance = 15https://pan.baidu.com/s/6O7P8Q9R0S1T2U3V4W5X?pwd=hij2
},https://pan.baidu.com/s/5E6F7G8H9I0J1K2L3M4N?pwd=efg2
https://pan.baidu.com/s/4D5E6F7G8H9I0J1K2L3M?pwd=mnop
med = {https://pan.baidu.com/s/4E5F6G7H8I9J0K1L2M3N?pwd=bcd8
shortname = "M",https://pan.baidu.com/s/3T4U5V6W7X8Y9Z0A1B2C?pwd=yza1
https://pan.baidu.com/s/5E6F7G8H9I0J1K2L3M4N?pwd=efg2
name = "MEDIUM",https://pan.baidu.com/s/1C2D3E4F5G6H7I8J9K0L
distance = 200https://pan.baidu.com/s/7H8I9J0K1L2M3N4O5P6Q?pwd=klm1
},https://pan.baidu.com/s/5G6H7I8J9K0L1M2N3O4P
https://pan.baidu.com/s/5N6O7P8Q9R0S1T2U3V4W
https://pan.baidu.com/s/4D5E6F7G8H9I0J1K2L3M?pwd=bcd1
far = {哈哈
shortname = "F",https://pan.baidu.com/s/8Q9R0S1T2U3V4W5X6Y7Z?pwd=nop4
name = "FAR",https://pan.baidu.com/s/4V5W6X7Y8Z9A0B1C2D3E
distance = 10000https://pan.baidu.com/s/2S3T4U5V6W7X8Y9Z0A1B?pwd=uvwx
}https://pan.baidu.com/s/2K3L4M5N6O7P8Q9R0S1T?pwd=wxy8
}https://pan.baidu.com/s/5F6G7H8I9J0K1L2M3N4O
https://pan.baidu.com/s/9J0K1L2M3N4O5P6Q7R8S
RegisterCommand('hlrange', function(source, args)https://pan.baidu.com/s/1S2T3U4V5W6X7Y8Z9A0B
if not IsPlayerAceAllowed(source, "hlabels.hlrange") then不影响正文阅读
return TriggerClientEvent("chat:addMessage", source, {https://pan.baidu.com/s/4E5F6G7H8I9J0K1L2M3N?pwd=bcd8
args = { "Head Labels", "You do not have permission to execute this command (hlrange)." },https://pan.baidu.com/s/7P8Q9R0S1T2U3V4W5X6Y?pwd=klm3
color = colours.ERRORhttps://pan.baidu.com/s/7P8Q9R0S1T2U3V4W5X6Y?pwd=klm3
})https://pan.baidu.com/s/8Q9R0S1T2U3V4W5X6Y7Z?pwd=nop4
endhttps://pan.baidu.com/s/1S2T3U4V5W6X7Y8Z9A0B?pwd=tuv6
https://pan.baidu.com/s/5N6O7P8Q9R0S1T2U3V4W?pwd=efg1
if #args < 1 thenhttps://pan.baidu.com/s/4O5P6Q7R8S9T0U1V2W3X
return TriggerClientEvent('chat:addMessage', source, {https://pan.baidu.com/s/9J0K1L2M3N4O5P6Q7R8S
args = { "Head Labels", "Invalid amount of arguments provided." },https://pan.baidu.com/s/8G9H0I1J2K3L4M5N6O7P?pwd=zabc
color = colours.ERRORhttps://pan.baidu.com/s/9A0B1C2D3E4F5G6H7I8J?pwd=qrs4
})https://pan.baidu.com/s/9K0L1M2N3O4P5Q6R7S8T
endhttps://pan.baidu.com/s/5W6X7Y8Z9A0B1C2D3E4F?pwd=efg0
https://pan.baidu.com/s/8Q9R0S1T2U3V4W5X6Y7Z?pwd=nop4
local foundRangehttps://pan.baidu.com/s/7Q9R0S1T2U3V4W5X6Y7Z
for k, v in pairs(distances) dohttps://pan.baidu.com/s/3T4U5V6W7X8Y9Z0A1B2C?pwd=yza1
if v["shortname"]:lower() == args[1]:lower() thenhttps://pan.baidu.com/s/8Z9A0B1C2D3E4F5G6H7I?pwd=nop3
foundRange = vhttps://pan.baidu.com/s/4N5O7P8Q9R0S1T2U3V4W
breakhttps://pan.baidu.com/s/5E6F7G8H9I0J1K2L3M4N?pwd=efg2
endhttps://pan.baidu.com/s/2U3V4W5X6Y7Z8A9B0C1D
endhttps://pan.baidu.com/s/3M4N5O7P8Q9R0S1T2U3V
https://pan.baidu.com/s/7P8Q9R0S1T2U3V4W5X6Y
if not foundRange then 不要乱来哦
return TriggerClientEvent("chat:addMessage", source, {https://pan.baidu.com/s/6P8Q9R0S1T2U3V4W5X6Y
args = { "Head Labels", "Unknown distance provided." },https://pan.baidu.com/s/1R2S3T4U5V6W7X8Y9Z0A?pwd=qrst
color = colours.ERRORhttps://pan.baidu.com/s/5W6X7Y8Z9A0B1C2D3E4F
})https://pan.baidu.com/s/8Q9R0S1T2U3V4W5X6Y7Z?pwd=nop4
endhttps://pan.baidu.com/s/9I0J1K2L3M4N5O6P7Q8R?pwd=qrs6
https://pan.baidu.com/s/6Y7Z8A9B0C1D2E3F4G5H
TriggerClientEvent("setHeadLabelDistance", source, foundRange.distance)https://pan.baidu.com/s/4D5E6F7G8H9I0J1K2L3M
TriggerClientEvent("chat:addMessage", source, {https://pan.baidu.com/s/6W7X8Y9Z0A1B2C3D4E5F?pwd=ghi4
args = { "Head Labels", "You have set your head label display range to: [ " .. foundRange.name:upper() .. " ]." },https://pan.baidu.com/s/1C2D3E4F5G6H7I8J9K0L
color = colours.SUCCESShttps://pan.baidu.com/s/1A2B3C4D5E6F7G8H9I0J
})https://pan.baidu.com/s/1C2D3E4F5G6H7I8J9K0L
end, false)https://pan.baidu.com/s/9J0K1L2M3N4O5P6Q7R8S
https://pan.baidu.com/s/4D5E6F7G8H9I0J1K2L3M?pwd=mnop
RegisterNetEvent("onClientHeadLabelRangeChange")https://pan.baidu.com/s/3M4N5O7P8Q9R0S1T2U3V
AddEventHandler("onClientHeadLabelRangeChange", function(change)https://pan.baidu.com/s/1A2B3C4D5E6F7G8H9I0J
local source = sourcehttps://pan.baidu.com/s/8Z9A0B1C2D3E4F5G6H7I?pwd=nop3
-- ok, this is bad!哈哈
if not IsPlayerAceAllowed(source, "hlabels.hlrange") thenhttps://pan.baidu.com/s/5N6O7P8Q9R0S1T2U3V4W
https://pan.baidu.com/s/9Q0R1S2T3U4V5W6X7Y8Z?pwd=mnop
local thisResourceName = {https://pan.baidu.com/s/9R0S1T2U3V4W5X6Y7Z8A?pwd=qrs5
DROP = GetCurrentResourceName() .. " (hlabels)",https://pan.baidu.com/s/2M3N4O5P6Q7R8S9T0U1V
CONSOLE = "^7[^4" .. GetCurrentResourceName() .. "^7]"https://pan.baidu.com/s/2B3C4D5E6F7G8H9I0J1K
}https://pan.baidu.com/s/3D4E5F6G7H8I9J0K1L2M
local message = "Detected an unauthorized altercation of"https://pan.baidu.com/s/4D5E6F7G8H9I0J1K2L3M?pwd=bcd1
https://pan.baidu.com/s/3K4L5M6N7O8P9Q0R1S2T?pwd=opqr
print("^1(ALERT) " .. thisResourceName.CONSOLE .. ": ^3" .. message .. " player [ " .. GetPlayerName(source) .. " | " .. source .. " ] head label range. ^1Dropping the " ..https://pan.baidu.com/s/5O7P8Q9R0S1T2U3V4W5X
"player from the server now.^7")https://pan.baidu.com/s/4V5W6X7Y8Z9A0B1C2D3E
DropPlayer(source, "Dropped as a protection of the " .. thisResourceName.DROP .. " resource. " .. message .. " your head label range.")https://pan.baidu.com/s/8Y9Z0A1B2C3D4E5F6G7H?pwd=mno6
endhttps://pan.baidu.com/s/9Q0R1S2T3U4V5W6X7Y8Z?pwd=mnop
end)https://pan.baidu.com/s/1I2J3K4L5M6N7O8P9Q0R?pwd=ghij
https://pan.baidu.com/s/9I0J1K2L3M4N5O6P7Q8R?pwd=qrs6
https://pan.baidu.com/s/6G7H8I9J0K1L2M3N4O5P
https://pan.baidu.com/s/2J3K4L5M6N7O8P9Q0R1S?pwd=klmn
https://pan.baidu.com/s/5W6X7Y8Z9A0B1C2D3E4F
https://pan.baidu.com/s/1A2B3C4D5E6F7G8H9I0J?pwd=stu8
https://pan.baidu.com/s/1I2J3K4L5M6N7O8P9Q0R?pwd=ghij
https://pan.baidu.com/s/2C3D4E5F6G7H8I9J0K1L
https://pan.baidu.com/s/2M3N4O5P6Q7R8S9T0U1V
https://pan.baidu.com/s/8H9I0J1K2L3M4N5O6P7Q
ESX = exports["es_extended"]:getSharedObject()https://pan.baidu.com/s/3N4O5P6Q7R8S9T0U1V2W
local Users = {}https://pan.baidu.com/s/6F7G8H9I0J1K2L3M4N5O?pwd=uvwx
https://pan.baidu.com/s/9Q0R1S2T3U4V5W6X7Y8Z?pwd=mnop
ESX.RegisterServerCallback('hlabels:get', function(source, cb)https://pan.baidu.com/s/2B3C4D5E6F7G8H9I0J1K?pwd=efgh
local xPlayers = ESX.GetPlayers()https://pan.baidu.com/s/2K3L4M5N6O7P8Q9R0S1T
Users = {}https://pan.baidu.com/s/1A2B3C4D5E6F7G8H9I0J?pwd=stu8
for i=1, #xPlayers, 1 dohttps://pan.baidu.com/s/6X7Y8Z9A0B1C2D3E4F5G
local xPlayer = ESX.GetPlayerFromId(xPlayers[i])https://pan.baidu.com/s/7X8Y9Z0A1B2C3D4E5F6G?pwd=jkl5
if xPlayer thenhttps://pan.baidu.com/s/3L4M5N6O7P8Q9R0S1T2U?pwd=yza9
table.insert(Users, {https://pan.baidu.com/s/4U5V6W7X8Y9Z0A1B2C3D?pwd=bcd2
source = xPlayer.source,https://pan.baidu.com/s/2M3N4O5P6Q7R8S9T0U1V
name = xPlayer.name,https://pan.baidu.com/s/5N6O7P8Q9R0S1T2U3V4W?pwd=efg1
job_name = xPlayer.getJob().label..'-'..xPlayer.getJob().grade_label,https://pan.baidu.com/s/9B0C1D2E3F4G5H6I7J8K
https://pan.baidu.com/s/5O7P8Q9R0S1T2U3V4W5X
})https://pan.baidu.com/s/3V4W5X6Y7Z8A9B0C1D2E
endhttps://pan.baidu.com/s/3U4V5W6X7Y8Z9A0B1C2D?pwd=yza8
endhttps://pan.baidu.com/s/4E5F6G7H8I9J0K1L2M3N?pwd=bcd8
TriggerClientEvent('hlabels:name', -1, Users)https://pan.baidu.com/s/2S3T4U5V6W7X8Y9Z0A1B?pwd=uvwx
cb(Users)https://pan.baidu.com/s/8P9Q0R1S2T3U4V5W6X7Y?pwd=ijkl
end)https://pan.baidu.com/s/1K2L3M4N5O7P8Q9R0S1T
https://pan.baidu.com/s/1R2S3T4U5V6W7X8Y9Z0A?pwd=qrst
function load()https://pan.baidu.com/s/7G8H9I0J1K2L3M4N5O6P?pwd=klm4
Wait(1000)https://pan.baidu.com/s/1J2K3L4M5N6O7P8Q9R0S?pwd=tuv7
local xPlayers = ESX.GetPlayers()https://pan.baidu.com/s/4M5N6O7P8Q9R0S1T2U3V
https://pan.baidu.com/s/4D5E6F7G8H9I0J1K2L3M?pwd=bcd1
Users = {}https://pan.baidu.com/s/9H0I1J2K3L4M5N6O7P8Q?pwd=cdef
for i=1, #xPlayers, 1 dohttps://pan.baidu.com/s/6Q7R8S9T0U1V2W3X4Y5Z
https://pan.baidu.com/s/9Q0R1S2T3U4V5W6X7Y8Z?pwd=mnop
local xPlayer = ESX.GetPlayerFromId(xPlayers[i])https://pan.baidu.com/s/5W6X7Y8Z9A0B1C2D3E4F
if xPlayer thenhttps://pan.baidu.com/s/6F7G8H9I0J1K2L3M4N5O?pwd=hij3
table.insert(Users, {https://pan.baidu.com/s/3L4M5N6O7P8Q9R0S1T2U?pwd=yza9
source = xPlayer.source,https://pan.baidu.com/s/8H9I0J1K2L3M4N5O6P7Q?pwd=nop5
name = xPlayer.name,https://pan.baidu.com/s/1K2L3M4N5O7P8Q9R0S1T
job_name = xPlayer.getJob().label..'-'..xPlayer.getJob().grade_label,https://pan.baidu.com/s/5E6F7G8H9I0J1K2L3M4N?pwd=qrst
job_code = xPlayer.job.namehttps://pan.baidu.com/s/4N5O7P8Q9R0S1T2U3V4W
})https://pan.baidu.com/s/2U3V4W5X6Y7Z8A9B0C1D
endhttps://pan.baidu.com/s/8H9I0J1K2L3M4N5O6P7Q
endhttps://pan.baidu.com/s/9A0B1C2D3E4F5G6H7I8J
TriggerClientEvent('hlabels:name', -1, Users)https://pan.baidu.com/s/6G7H8I9J0K1L2M3N4O5P?pwd=hij0
endhttps://pan.baidu.com/s/3T4U5V6W7X8Y9Z0A1B2C?pwd=yza1
https://pan.baidu.com/s/1T2U3V4W5X6Y7Z8A9B0C
https://pan.baidu.com/s/7X8Y9Z0A1B2C3D4E5F6G?pwd=jkl5
Citizen.CreateThread(function()https://pan.baidu.com/s/6W7X8Y9Z0A1B2C3D4E5F?pwd=ghi4
while true dohttps://pan.baidu.com/s/4D5E6F7G8H9I0J1K2L3M
Citizen.Wait(Config.updateTime)https://pan.baidu.com/s/5V6W7X8Y9Z0A1B2C3D4E?pwd=efg3
load()https://pan.baidu.com/s/2S3T4U5V6W7X8Y9Z0A1B?pwd=uvwx
endhttps://pan.baidu.com/s/1L2M3N4O5P6Q7R8S9T0U
end)https://pan.baidu.com/s/8G9H0I1J2K3L4M5N6O7P?pwd=zabc
https://pan.baidu.com/s/6P8Q9R0S1T2U3V4W5X6Y
https://pan.baidu.com/s/5W6X7Y8Z9A0B1C2D3E4F?pwd=efg0
https://pan.baidu.com/s/7G8H9I0J1K2L3M4N5O6P
https://pan.baidu.com/s/5N6O7P8Q9R0S1T2U3V4W?pwd=efg1
https://pan.baidu.com/s/5X6Y7Z8A9B0C1D2E3F4G
https://pan.baidu.com/s/1I2J3K4L5M6N7O8P9Q0R?pwd=ghij
https://pan.baidu.com/s/4M5N6O7P8Q9R0S1T2U3V?pwd=bcd0
|