AR/isElementWithinColShape: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
Line 18: Line 18:
local myShape = isElementWithinColShape(localPlayer, newColShape)
local myShape = isElementWithinColShape(localPlayer, newColShape)
if myShape then
if myShape then
outputChatBox("You Are In The Col Shape", 0, 255, 0)
outputChatBox("انت بداخل المنطقه", 0, 255, 0)
else
else
outputChatBox("You Aren't In The Col Shape", 255, 0, 0)
outputChatBox("انت لست بداخل المنطقه", 255, 0, 0)
end
end
end
end

Revision as of 19:06, 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("انت بداخل المنطقه", 0, 255, 0)
else
outputChatBox("انت لست بداخل المنطقه", 255, 0, 0)
end
end
addCommandHandler("ColShape", isInColShape)

See Also

Shared