getFoliageSurface
Client-side
Returns the GTA surface ID a foliage patch grows from.
Syntax
int|false getFoliageSurface(foliage theFoliage)Arguments
theFoliagefoliageFoliage element.
Returns
The surface ID from 0 through 255, or false when the element is not a foliage element.
Ownership and lifecycle
A foliage element belongs to the resource that created it and joins its element group, so stopping the resource removes its patches without explicit cleanup. Every setter rebuilds the native triangle atomically and rolls back to the previous state when the new combination is rejected.
OOP aliases
foliage:getSurface()foliage.surface
Where this comes from
SOURCECLuaFoliageDefs.cppClient/mods/deathmatch/logic/luadefs/CLuaFoliageDefs.cpp INTRODUCED / EXTENDED29e4398beRead the commit and why the change was made TEST RESOURCE foliage-test test-resources/foliage-test
RELATED NEON APIS
Read the system guide →