IsValidLight - GalaxHD551/lightstreamer GitHub Wiki
Description
Check if the specified light is valid or not.
Syntax
lr.IsValidLight(lightid)
Parameters
-
lightid
The light identifier.
Return Value
- Returns true if the light exists.
Exemple
lr = ImportPackage("lightstreamer")
function cmd_destroylight(player, light)
if light == nil then return end
if lr.IsvalidLight(lightid) then
lr.DestroyLight(lightid)
AddPlayerChat(player, "The light was deleted")
end
end, 1500)
end
AddCommand("light", cmd_destroylight)