local font_flag = require('moonloader').font_flag
local my_font = renderCreateFont('Verdana', 12, font_flag.BOLD + font_flag.SHADOW)
function main()
if not isSampLoaded() or not isSampfuncsLoaded() then return end
while not isSampAvailable() do wait(100) end
while true do wait(0)
local per,zad = '', ''
for id = 0, 1000 do
local res, hn = sampGetCharHandleBySampPlayerId(id)
if res then
local xx,yy,zz = getCharCoordinates(hn)
local x,y,z = getCharCoordinates(playerPed)
if getCharHeading(playerPed) >= 0 and getCharHeading(playerPed) <= 90 then
if x < xx and y < yy or x < xx and y > yy then zad = zad ..'\n'..sampGetPlayerNickname(id)
elseif x > xx and y > yy or x > xx and y < yy then per = per ..'\n'..sampGetPlayerNickname(id)
else
sampAddChatMessage('xz',-1)
end
elseif getCharHeading(playerPed) >= 90 and getCharHeading(playerPed) <= 180 then
if x < xx and y < yy or x > xx and y < yy then zad = zad ..'\n'..sampGetPlayerNickname(id)
elseif x < xx and y > yy or x > xx and y > yy then per = per ..'\n'..sampGetPlayerNickname(id)
else
sampAddChatMessage('xz',-1)
end
elseif getCharHeading(playerPed) >= 180 and getCharHeading(playerPed) <= 270 then
if x < xx and y < yy or x < xx and y > yy then per = per ..'\n'..sampGetPlayerNickname(id)
elseif x > xx and y > yy or x > xx and y < yy then zad = zad ..'\n'..sampGetPlayerNickname(id)
else
sampAddChatMessage('xz',-1)
end
elseif getCharHeading(playerPed) >= 270 and getCharHeading(playerPed) <= 360 then
if x < xx and y < yy or x > xx and y < yy then per = per ..'\n'..sampGetPlayerNickname(id)
elseif x < xx and y > yy or x > xx and y > yy then zad = zad ..'\n'..sampGetPlayerNickname(id)
else
sampAddChatMessage('xz',-1)
end
end
end
end
renderFontDrawText(my_font, 'Перед тобой: {FFFF00}'..per..'\n{FFFFFF}За тобой: {FFFF00}'..zad, 10, 400, 0xFFFFFFFF)
end
end
[/QUOTE]
[QUOTE="qdIbp, post: 947970, member: 437764"]