how to increase the draw distance of the moonaddition's spotlight script effect?

Akiri

Новичок
Автор темы
2
0
Версия SA-MP
  1. Другая
there is a lua script named streetlight.lua which comes from moonaddition's example scripts pack.
it adds spotlight effect to the game's lamppost,but it's draw distance is very short. anyone knows how to increase it's draw distance. pleeeeeeeeease

this is its code:
---------------------------------------------------------------------------
script_name('Spotlight Example')
local mad = require 'MoonAdditions'

function main()
while true do
wait(0)
if isPlayerPlaying(PLAYER_HANDLE) then
local x, y, z = getCharCoordinates(PLAYER_PED)
for _, object in ipairs(mad.get_all_objects(x, y, z, 300)) do
local model = getObjectModel(object)
if model == 1226 and getObjectHealth(object) > 0 then
local matrix = mad.get_object_matrix(object)
if matrix then
local objx, objy, objz = matrix:get_coords_with_offset(-1.3, 0.165, 3.69)
local ground_z = getGroundZFor3dCoord(objx, objy, objz)
mad.draw_spotlight(objx, objy, objz, objx, objy, ground_z, 0.065, 27)
end
end
end
end
end
end
---------------------------------------------------------------------------
 

Вложения

  • streetlights.lua
    693 байт · Просмотры: 0