Jump to content

Move object - (crazy stuff Please HELP)


Recommended Posts

Posted

Hey,

I have this script, and when i enter the colshape it basicly does alot of crazy stuff, i need the barrier to move up when enter and down when leave, but it rotates randomly on colshape enter.

Heres my code

Barrier = createObject ( 968, 1544.69, -1630.8, 13.3, 0, 89, 90 ) 
Col = createColTube(1544.8, -1630.3720703125, 11.8182258605957, 10, 10) 
  
addEventHandler('onColShapeHit', Col, 
     function(hitElement, dim) 
         if getElementType(hitElement) == 'player' then 
           if getTeamName(getPlayerTeam" class="kw2">getPlayerTeam" class="kw2">getPlayerTeam(hitElement))=="Police" then 
            playSoundFrontEnd ( 41 ) 
            moveObject(Barrier, 3000, 1544.69, -1630.8, 13.3, 0, 0, 90) 
           end 
         end 
    end 
) 
  
addEventHandler('onColShapeLeave', Col, 
    function(hitElement, dim) 
         if getElementType(hitElement) == 'player' then 
        if getTeamName(getPlayerTeam" class="kw2">getPlayerTeam(hitElement))=="Police" then 
            moveObject(Barrier, 3000, 1544.69, -1630.8, 13.3, 0, 89, 90) 
        end 
         end 
    end 
) 

Can anyone help me with this and correct my code?

Thanks

Founder of SAUR - Founder/Owner of ARC RPG

Posted

Are you sure he can script? It seems he pastes XML nodes hoping lua can read his mind and make a script.

Retired

Posted

Im pretty sure he can script... go to 78.109.189.219:22003 if you dont belive me, all i need is help and im turning here to my last resort cus im shit at computers.

Founder of SAUR - Founder/Owner of ARC RPG

Posted
Why do you randomly have 'class="kw2">' all over your script?

because [lua] is not showing getPlayerTeam ... and add after it 'class="kw2">'

so re edit your code and rename each getPlayerTeam to getPlayerTeam_1

تيم سبيك بروجيمر

ts3server://ts.pg.sa

Posted

i would recommend u use doors by acl since if people not on a team (when they login) the gate will open saying unknown or u got to add the gate to not open to unknown teams.

Posted

Heres the script as it should be without kw2 crap

Barrier = createObject ( 968, 1544.69, -1630.8, 13.3, 0, 89, 90 ) 
Col = createColTube(1544.8, -1630.3720703125, 11.8182258605957, 10, 10) 
  
addEventHandler('onColShapeHit', Col, 
     function(hitElement, dim) 
         if getElementType(hitElement) == 'player' then 
           if getTeamName(getPlayerTeam(hitElement))=="Police" then 
            moveObject(Barrier, 3000, 1544.69, -1630.8, 13.3, 0, 0, -90) 
           end 
         end 
    end 
) 
  
addEventHandler('onColShapeLeave', Col, 
    function(hitElement, dim) 
         if getElementType(hitElement) == 'player' then 
        if getTeamName(getPlayerTeam(hitElement))=="Police" then 
            moveObject(Barrier, 2000, 1544.69, -1630.8, 13.3, 0, 89, 90) 
        end 
         end 
    end 
) 

Founder of SAUR - Founder/Owner of ARC RPG

Posted

i replied in your other topic, you didnt even bother to undestand.

now you want it to move UP, but setting rotation with moveObject. seriously, why?

?

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