Jump to content

[Help]Gate open


Recommended Posts

Posted
local aAllowedGroups = 
{ 
    [ 'Armed Forces' ] = true; 
    [ false ] = false; 
} 
  
local pCol = createColSphere ( 330.99554443359, 1805.4046630859, 17.769592285156, 31 ) 
local pGate = createObject ( 3113, 344.6220703125, 1797.90625, 18.285552978516, 0, 15, 305 ) 
  
function ColShapeManager( pElement ) 
    if 
        getElementType( pElement ) == 'player' and 
        aAllowedGroups[ getElementData ( pElement, 'Armed Forces' ) ] 
    then 
        if eventName == 'onColShapeHit' then 
            moveObject ( pGate, 344.6220703125, 1797.90625, 6.7855529785156, 0, 15, 305 ) 
        else 
            moveObject( pGate, 3037, 344.6220703125, 1797.90625, 18.285552978516, 0, 15, 305 ) 
        end 
    end 
end 
addEventHandler( 'onColShapeHit', pCol, ColShapeManager ) 
addEventHandler( 'onColShapeLeave', pCol, ColShapeManager ) 

what is problem?

Posted

We cannot help you if you don't even test your script.

What is this?

local aAllowedGroups = 
{ 
    [ 'Armed Forces' ] = true; 
    [ false ] = false; -- This. 
} 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
if eventName == 'onColShapeHit' then 

eventName is not defined.

:/

Did you read my topic about predefined variables?

http://vk.com/the_kenix

Вопросы задавайте на форуме, не пишите мне в личку.

Please don't pm me.

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