Детект поподания по игроку

Nekiplay

Участник
Автор темы
39
25
Версия SA-MP
  1. 0.3.7-R3
Детект поподания по игроку созданного через createChar
В режиме фейк афк

Код ниже не всегда выводит поподания

Lua:
function event.onSendBulletSync(data)
    if activ == true then
    
        local target_x, target_y, target_z = data.target.x, data.target.y, data.target.z
        local origin_x, origin_y, origin_z = data.origin.x, data.origin.y, data.origin.z
    
        local result, colPoint = processLineOfSight(origin_x, origin_y, origin_z, target_x, target_y, target_z, false, false, true, false, false, false, true, true)
    
        if result then
            shotttts = shotttts + 1
            local entity = colPoint.entity
            if entity then
                sampAddChatMessage("Hit #1: " .. entity , -1)
            end
        end
        
        
        
        return false
    end
end