Jump to content

How to make col rectangles correctly ?


Piorun

Recommended Posts

Posted

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.

Posted
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 
) 

Posted

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.

Posted

Ye i was in area and don't shown it on game-hud-radar. I still can saw them on F11 map. Meybe i should create it client-side?

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...