script_name('Версия 0.1')
script_author('Автор Dezmond (Zein_Lincoln)')
script_description('filscar')
require "lib.moonloader"
function main()
if not isSampLoaded() or not isSampfuncsLoaded() then return end
while not isSampAvailable() do wait(2000) end
sampAddChatMessage('Автор скрипта Dezmond (Zein_Lincoln)',0xFFFF00)
sampAddChatMessage("Активация скрипта /fc" ,0xFFFF00)
sampRegisterChatCommand('fc', filscar)
while true do
wait(0)
end
end
function filscar()
local peds = getAllChars()
for _, v in pairs(peds) do
local result, myid = sampGetPlayerIdByCharHandle(playerPed)
local mx, my, mz = getCharCoordinates(playerPed)
local x, y, z = getCharCoordinates(v)
local distance = getDistanceBetweenCoords3d(mx, my, mz, x, y, z)
local result, id = sampGetPlayerIdByCharHandle(v)
if result and id ~= sampGetPlayerIdByCharHandle(PLAYER_PED) and distance < 12.0 then
if id ~= myid then
sampSendChat('/filscar '..tostring(id) )
end
end
end
end