Search the Community
Showing results for tags 'onconshapehit'.
-
alguém poderia explicar porque as funções 'entrando' e 'saindo' não estão funcionando? pls local aSavePlaces = { {1587.1513671875, -1152.365234375,245, 160}; -- BOSS LS {2372.2763671875, 1836.701171875,150, 160}; -- BOSS LV {-2140.8330078125, 124.470703125,150, 185}; -- BOSS SF } local aRadarAreaPlaces = { {1587.1513671875, -1152.365234375,245, 160,255,0,0,100}; -- BOSS LS {2372.2763671875, 1836.701171875,150, 160,255,0,0,100}; -- BOSS LV {-2140.8330078125, 124.470703125,150, 185,255,0,0,100}; -- BOSS SF } function criandoareas( ) for _, a in ipairs( aRadarAreaPlaces ) do pRadarArea = createRadarArea ( unpack( a ) ) setElementData( pRadarArea, "zombieProof", true ) end for _, b in ipairs( aSavePlaces ) do zona = createColRectangle ( unpack( b ) ) end addEventHandler ( "onColShapeHit", zona ,entrando) addEventHandler ( "onColShapeLeave", zona , saindo) end addEventHandler ( "onResourceStart", resourceRoot,criandoareas) function entrando( pHitElement ) if getElementType( pHitElement ) == 'player' then outputChatBox("[BOSS] - Você entrou em área BOSS.", pHitElement, 0, 145, 0, true) elseif getElementData(pHitElement,"zombie") and getElementType( pHitElement ) == 'ped' then killPed(pHitElement) end end function saindo( pHitElement ) if getElementType( pHitElement ) == 'player' then outputChatBox("[BOSS] - Você saiu da área BOSS.", pHitElement, 145, 0, 0, true) elseif getElementData(pHitElement,"zombie") and getElementType( pHitElement ) == 'ped' then killPed(pHitElement) end end