AR/isElementWithinColShape: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "==Syntax== <syntaxhighlight lang="lua">bool isElementWithinColShape ( element theElement, colshape theShape )</syntaxhighlight> {{OOP||element:isWithinColShape}} ===Required Arguments=== *'''theEl...")
(No difference)

Revision as of 18:52, 26 March 2016

Syntax

bool isElementWithinColShape ( element theElement, colshape theShape )

OOP Syntax Help! I don't understand this!

Method: element:isWithinColShape(...)


Required Arguments

  • theElement: العنصر الذي تريد ان يحدد اذا كان بداخل المنطقه
  • theShape: اسم المنطقه التي تريد ان يحدد اذا كان الاعب بداخلها

Returns

Returns اذا لم يكن بداخل المنطقه false اذا كان الاعب بداخل المنطقه, القيمة true القيمة

Example

Click to collapse [-]
Client
local newColShape = createColRectangle (-2396.65625,-600.09943, 50, 50) 
function isInColShape()
local myShape = isElementWithinColShape(localPlayer, newColShape)
if myShape then
outputChatBox("You Are In The Col Shape", 0, 255, 0)
else
outputChatBox("You Aren't In The Col Shape", 255, 0, 0)
end
end
addCommandHandler("ColShape", isInColShape)

See Also