IsAttachedLight - GalaxHD551/lightstreamer GitHub Wiki
Description
Check if the specified light is attached or not.
Syntax
lr.IsAttachedLight(lightid)
Parameters
-
lightid
The light identifier.
Return Value
- Returns true if the light is attached to something.
Exemple
lr = ImportPackage("lightstreamer")
function cmd_detachlight(player, lightid)
if lightid == nil then return end
if lr.IsAttachedLight(lightid) then
lr.SetLightDetached(lightid)
AddPlayerChat(player, "light has been detached")
end
end
AddCommand("light", cmd_detachlight)