IsRadarAreaFlashing: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
(Added OOP syntax)
Line 7: Line 7:
bool isRadarAreaFlashing ( radararea theRadararea )               
bool isRadarAreaFlashing ( radararea theRadararea )               
</syntaxhighlight>  
</syntaxhighlight>  
{{OOP||[[radararea]]:isFlashing|flashing}}


===Required Arguments===  
===Required Arguments===  

Revision as of 17:37, 26 November 2014

This function allows detection of whether a radar area is flashing or not.

Syntax

bool isRadarAreaFlashing ( radararea theRadararea )               

OOP Syntax Help! I don't understand this!

Method: radararea:isFlashing(...)
Variable: .flashing


Required Arguments

  • theRadararea: The radar area you wish to check the state of flashing

Returns

Returns true if the radar area is flashing, false if it is not or if it doesn't exist.

Example

This example checks whether the radar area in the variable glenpark is flashing, and announces it if it is.

function checkArea(sourcePlayer)
    if ( isRadarAreaFlashing ( glenpark ) ) then          -- if the radar area in the variable glenpark is flashing
        outputChatBox ( "Glen Park is under attack!!!" )  -- announce it
    end
end
addCommandHandler("checkArea", checkArea)

See Also