isWorldSpecialPropertyEnabled | Multi Theft Auto: Wiki Skip to content

isWorldSpecialPropertyEnabled

Client-side
Server-side
Shared

Pair: setWorldSpecialPropertyEnabled

Manual Review Required

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


Checks if a special world property (cheat) is enabled or not.

Syntax

bool isWorldSpecialPropertyEnabled ( string propname )
Required Arguments
  • propname: the name of the property to retrieve. Possible values are listed on SetWorldSpecialPropertyEnabled .

Returns

  • bool: value

Returns true if the property is enabled, false if it is disabled or the specified property name is invalid.

Code Examples

shared

This code allows you to enable/disable aircars world property using /toggleAirCars command.

function toggleAirCars()
setWorldSpecialPropertyEnabled( "aircars", not isWorldSpecialPropertyEnabled("aircars") )
end
addCommandHandler("toggleAirCars", toggleAirCars)

See Also

World Functions