IsElementWithinMarker: Difference between revisions
Jump to navigation
Jump to search
m (Removed from needs example category (it has one).) |
mNo edit summary |
||
Line 15: | Line 15: | ||
==Example== | ==Example== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
dutymarker = createMarker(126.56,254.98,78.9,'cylinder', 2.0, 255, 0, 0, 150) | dutymarker = createMarker(126.56, 254.98, 78.9, 'cylinder', 2.0, 255, 0, 0, 150) | ||
function duty( | function duty(thePlayer, matchingDimension) | ||
if | if isElementWithinMarker(thePlayer, dutymarker) then | ||
giveWeapon( | giveWeapon(thePlayer, 22, 100, 1) | ||
else | else | ||
outputChatBox("You are not at the right place!", | outputChatBox("You are not at the right place!", thePlayer, 255, 0, 0) | ||
end | end | ||
end | end |
Revision as of 19:15, 5 June 2010
This function is used to determine if an element is within a marker.
Syntax
bool isElementWithinMarker ( element theElement, marker theMarker )
Required Arguments
Returns
Returns true if the element is within the marker, false otherwise
Example
dutymarker = createMarker(126.56, 254.98, 78.9, 'cylinder', 2.0, 255, 0, 0, 150) function duty(thePlayer, matchingDimension) if isElementWithinMarker(thePlayer, dutymarker) then giveWeapon(thePlayer, 22, 100, 1) else outputChatBox("You are not at the right place!", thePlayer, 255, 0, 0) end end addCommandHandler("duty", duty)
See Also
- createMarker
- getMarkerColor
- getMarkerCount
- getMarkerIcon
- getMarkerSize
- getMarkerTarget
- getMarkerType
- setMarkerColor
- setMarkerIcon
- setMarkerSize
- setMarkerTarget
- setMarkerType
- isElementWithinMarker