Jump to content

How to make col rectangles correctly ?


Piorun

Recommended Posts

Hi guys.

I want to ask why when i make something like that:

createRadarArea(983.08239746094, 691.31982421875, 1900, 2200, 0, 255, 0, 175) 
local lvCol = createColRectangle(983.08239746094, 691.31982421875, 1900, 2200) 

and enter into this ColRectangle (i have functions handled to correctly events) event doesn't works correctly (anyway nothing happend). What i'm doing wrong? Meybe some parametrs are wrong? Anyway no errors in debug.

Link to comment
createRadarArea(983.08239746094, 691.31982421875, 1900, 2200, 0, 255, 0, 175) 
local lvCol = createColRectangle(983.08239746094, 691.31982421875, 1900, 2200) 
  
addEventHandler("onColShapeHit", lvCol, 
    function(hitElement, matchingDimension) 
        if getElementType(hitElement) == "player" then 
            if matchingDimension then 
                outputChatBox("You entered a collision shape rectangle.", hitElement, 255, 255, 255, false) 
            end 
        end 
    end 
) 

Link to comment

oO ...

Don't know what was wrong in my code but myonlake's code working so good. Thank you and another q:

How to create radar area which be show on bottom-left corner radar, cause I create areas with createRadarArea and i see them only in F11 map.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...