local scriptState = false
local ignore = {}
function main()
while not isSampAvailable() do wait(0) end
sampRegisterChatCommand('hotbot', my_cmd)
while true do wait(0)
if scriptState then
chars = getAllChars()
for k, v in pairs(chars) do
if v ~= PLAYER_PED then
px,py,pz = getCharCoordinates(v)
mx,my,mz = getCharCoordinates(PLAYER_PED)
dist = getDistanceBetweenCoords3d(px,py,pz,mx,my,mz)
if dist < 5.5 then
res, id = sampGetPlayerIdByCharHandle(v)
if res then
sampSendChat('/selleat '..id)
wait(3000)
end
end
end
end
end
end
end
function my_cmd()
scriptState = not scriptState
if scriptState then sampAddChatMessage('Ok', 0x00FF00)
else sampAddChatMessage('No', 0xFF0000) end
end