setWorldSpecialPropertyEnabled | Multi Theft Auto: Wiki Skip to content

setWorldSpecialPropertyEnabled

Client-side
Server-side
Shared

Pair: isWorldSpecialPropertyEnabled

This page is incomplete! Help wanted!

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


Enables or disables a special world property.

Note

It's recommended to use server-side function with appropriate minclientversion for properties like " underworldwarp ", " burnflippedcars ", " extendedwatercannons ", " flyingcomponents ", " vehicle_engine_autostart " to avoid possible data desynchronization.

Syntax

setWorldSpecialPropertyEnabled ( )

Code Examples

server

This code allows you to enable/disable certain property usingtrueorfalse.

local worldSpecialProperties = {
["hovercars"] = false,
["aircars"] = false,
["extrabunny"] = false,
["extrajump"] = false,
["randomfoliage"] = true,
["snipermoon"] = false,
["extraairresistance"] = true,
["underworldwarp"] = true,
["vehiclesunglare"] = false,
["coronaztest"] = true,
["watercreatures"] = true,
["burnflippedcars"] = true,
["fireballdestruct"] = true,
["roadsignstext"] = true,
["extendedwatercannons"] = true,
["tunnelweatherblend"] = true,
["ignorefirestate"] = false,
["flyingcomponents"] = true,
["vehicleburnexplosions"] = true,
["vehicle_engine_autostart"] = true,
}
local function toggleWorldSpecialProperties()
for propertyName, propertyState in pairs(worldSpecialProperties) do
setWorldSpecialPropertyEnabled(propertyName, propertyState)
end
end
addEventHandler("onClientResourceStart", resourceRoot, toggleWorldSpecialProperties)

See Also

World Functions