Jump to content

[HELP] LSPD Gate


Z-Dash

Recommended Posts

I just made a script for a gate that opens for Police team only

"ColShape"

and it's not opening when I get close (in a police team) please help

    eBarrier = createObject ( 968, 1544.6999511719, -1630.5999755859, 13.10000038147, 0, 90, 90 ) 
    gatecol = createColCircle ( 1544.5999755859, -1627.1999511719, 12.39999961853, 4 ) 
    bar1 = createObject ( 994, 1544.6999511719, -1623.9000244141, 12.39999961853, 0, 0, 90 ) 
    bar2 = createObject ( 994, 1544.6999511719, -1623.9000244141, 13.39999961853, 0, 0, 90 ) 
    bar3 = createObject ( 994, 1544.9000244141, -1639.0000000000, 12.39999961853, 0, 0, 90 ) 
    bar4 = createObject ( 994, 1544.9000244141, -1639.0000000000, 13.39999961853, 0, 0, 90 ) 
     
function og(thePlayer) 
if ( getTeamName(getPlayerTeam(thePlayer)) == "Police" ) then 
    moveObject (eBarrier, 1500, 1544.6999511719, -1630.5999755859, 13.10000038147, 0, 0, 90 ) 
end 
  
function cg(thePlayer) 
if ( getTeamName(getPlayerTeam(thePlayer)) == "Police" ) then 
    moveObject (eBarrier, 1500, 1544.6999511719, -1630.5999755859, 13.10000038147, 0, 90, 90 ) 
end 
  
addEventHandler( "onColShapeHit", gatecol, og ) 
end 
  
addEventHandler( "onColShapeLeave", gatecol, cg ) 
end 

And also i wanna know how can i show colshapes,i remember that can be with a command but i dont remember it,pls help

Link to comment
eBarrier = createObject ( 968, 1544.6999511719, -1630.5999755859, 13.10000038147, 0, 90, 90 ) 
    gatecol = createColCircle ( 1544.5999755859, -1627.1999511719, 12.39999961853, 4 ) 
    bar1 = createObject ( 994, 1544.6999511719, -1623.9000244141, 12.39999961853, 0, 0, 90 ) 
    bar2 = createObject ( 994, 1544.6999511719, -1623.9000244141, 13.39999961853, 0, 0, 90 ) 
    bar3 = createObject ( 994, 1544.9000244141, -1639.0000000000, 12.39999961853, 0, 0, 90 ) 
    bar4 = createObject ( 994, 1544.9000244141, -1639.0000000000, 13.39999961853, 0, 0, 90 ) 
    
function og(thePlayer) 
    if getElementType(thePlayer) == "player" then 
        if ( getTeamName(getPlayerTeam(thePlayer)) == "Police" ) then 
        moveObject (eBarrier, 1500, 1544.6999511719, -1630.5999755859, 13.10000038147, 0, 0, 90 ) 
        end 
    end  
end 
  
function cg(thePlayer) 
    if getElementType(thePlayer) == "player" then 
        if ( getTeamName(getPlayerTeam(thePlayer)) == "Police" ) then 
        moveObject (eBarrier, 1500, 1544.6999511719, -1630.5999755859, 13.10000038147, 0, 90, 90 ) 
        end 
    end 
end 
  
addEventHandler( "onColShapeHit", gatecol, og ) 
addEventHandler( "onColShapeLeave", gatecol, cg ) 

Also the col circle is bad argument

Read the wiki carefully

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