setSearchLightStartRadius | Multi Theft Auto: Wiki Skip to content

setSearchLightStartRadius

Client-side
Server-side
Shared

Pair: getSearchLightStartRadius

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


This function sets the start radius of a searchlight element.

OOP Syntax Help! I don't understand this!

  • Method: searchlight:setStartRadius(...)
  • Variable: .startRadius

Syntax

bool setSearchLightStartRadius ( searchlight theSearchlight, float startRadius )
Required Arguments
  • theSearchlight: MISSING_PARAM_DESC
  • startRadius: the radius of the searchlight's light cone in its beginning.

Returns

  • bool: value

If every argument is correct, this function returns true . If not, it will return false plus an error message.

Code Examples

shared

This example creates a skywalker light on top of Los Santos' skyscraper and turns it on/off every second by setting it's ending radius and starting radius to 0.

skywalkerLight = createSearchLight (1544, -1353.5, 330, 1528, -1347, 360, 0.2, 3, false)
setTimer (function ()
if not off then
setSearchLightStartRadius (skywalkerLight, 0)
setSearchLightEndRadius (skywalkerLight, 0)
off = true
else
setSearchLightStartRadius (skywalkerLight, 0.2)
setSearchLightEndRadius (skywalkerLight, 3)
off = false
end
end, 1000, 0)