isElementLocal | Multi Theft Auto: Wiki Skip to content

isElementLocal

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

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


This function checks whether a clientside element is local to the client (doesn't exist in the server) or not.

Syntax

isElementLocal ( )

Code Examples

client

This clientside function destroys all local radar blips.

function destroyAllLocalBlips()
-- Get a table containing all blips
local allBlips = getElementsByType("blip")
-- For each blip in this table
for blipID = 1, #allBlips do
local blipElement = allBlips[blipID]
-- Check if it's a blip that only exists locally
if isElementLocal(blipElement) then
-- And destroy it in that case
destroyElement(blipElement)
end
end
end

See Also

Element Functions