Jump to content

como usar o createColCuboid


Recommended Posts

Coloquei essa linha de codigo do lado serve.

theZone = false

function shapeHit ( thePlayer ) 
    outputChatBox ( getPlayerName ( thePlayer ) .. " is in the zone!" )  
end

function setZone ( playerSource, commandName, fX, fY, fZ )
    if ( fZ and fY and fX ) then                                         
        local tempCol = createColCuboid ( fX, fY, fZ, 10.0, 10.0, 10.0 )   
        if ( tempCol == false ) then                                     
            outputConsole ( "Syntax is: set_zone <X> <Y> <Z>" )         
        else
            if ( theZone ~= false ) then                                 
                destroyElement ( theZone )                              
            else
                addEventHandler ( "onColShapeHit", theZone, shapeHit )   
            end
            theZone = tempCol                                            
            outputChatBox ( "Zone has moved!" )                          
        end
    end
end
addCommandHandler ( "set_zone", setZone )

 

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