AR/isElementWithinColShape

From Multi Theft Auto: Wiki
Revision as of 18:52, 26 March 2016 by Mhmd.z (talk | contribs) (Created page with "==Syntax== <syntaxhighlight lang="lua">bool isElementWithinColShape ( element theElement, colshape theShape )</syntaxhighlight> {{OOP||element:isWithinColShape}} ===Required Arguments=== *'''theEl...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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