Jump to content

Gate Script


Reaper

Recommended Posts

gate1 = createObject (Gate ID, x,y,z, rx,ry,rz ) 
    gatecol =  createColCircle (x, y,z)----Put here the new dimensions u move ur gate to. 
    local teamName = "Your Team name here" 
                    
function OpenGates (thePlayer) 
if ( getTeamName(getPlayerTeam(thePlayer)) == "Your Team name here" ) then 
    moveObject (gate1,2000,x,y, z ) 
    end 
    end 
    addEventHandler( "onColShapeHit", gatecol, OpenGates ) 
              
function CloseGates (thePlayer) 
if ( getTeamName(getPlayerTeam(thePlayer)) == "Your Team name here" ) then 
    moveObject (gate1,2000,x, y,z )---Put here the original position of ur gate before it moves. 
    end 
    end 
    addEventHandler( "onColShapeLeave", gatecol, CloseGates ) 

This is a simple gate code i've made months ago.Post here anything u dont understand from above.

Link to comment
gate1 = createObject (Gate ID, x,y,z, rx,ry,rz ) 
    gatecol =  createColCircle (x, y,z)----Put here the new dimensions u move ur gate to. 
    local teamName = "Your Team name here" 
                    
function OpenGates (thePlayer) 
if ( getTeamName(getPlayerTeam(thePlayer)) == "Your Team name here" ) then 
    moveObject (gate1,2000,x,y, z ) 
    end 
    end 
    addEventHandler( "onColShapeHit", gatecol, OpenGates ) 
              
function CloseGates (thePlayer) 
if ( getTeamName(getPlayerTeam(thePlayer)) == "Your Team name here" ) then 
    moveObject (gate1,2000,x, y,z )---Put here the original position of ur gate before it moves. 
    end 
    end 
    addEventHandler( "onColShapeLeave", gatecol, CloseGates ) 

This is a simple gate code i've made months ago.Post here anything u dont understand from above.

Link to comment

You want it for all or with groups or with teams ?

I just answered him that he defined the team name in a variable named 'teamName' and he didn't use it at all

what function should i change "teamName" to?Cuz script is w

Link to comment

You want it for all or with groups or with teams ?

I just answered him that he defined the team name in a variable named 'teamName' and he didn't use it at all

what function should i change "teamName" to?Cuz script is w

Link to comment

Basically, now you have just to define the cordinations x,y,z , roation, add your team name if needed else remove this part and others like object ..etc

click on the functions to read more about them in the wiki.

local gate1 = createObject (Gate ID, x,y,z, rx,ry,rz ) 
local gatecol =  createColCircle (x, y, z)----Put here the new dimensions u move ur gate to. 
local teamName = "Your Team name here" 
                    
function OpenGates (thePlayer) 
    if ( getTeamName(getPlayerTeam(thePlayer)) == teamName ) then 
        moveObject (gate1,2000,x,y, z ) 
    end 
end 
addEventHandler( "onColShapeHit", gatecol, OpenGates ) 
              
function CloseGates (thePlayer) 
    if ( getTeamName(getPlayerTeam(thePlayer)) == teamName ) then 
        moveObject (gate1,2000,x, y, z )---Put here the original position of ur gate before it moves. 
    end 
end 
addEventHandler( "onColShapeLeave", gatecol, CloseGates ) 

Link to comment

Basically, now you have just to define the cordinations x,y,z , roation, add your team name if needed else remove this part and others like object ..etc

click on the functions to read more about them in the wiki.

local gate1 = createObject (Gate ID, x,y,z, rx,ry,rz ) 
local gatecol =  createColCircle (x, y, z)----Put here the new dimensions u move ur gate to. 
local teamName = "Your Team name here" 
                    
function OpenGates (thePlayer) 
    if ( getTeamName(getPlayerTeam(thePlayer)) == teamName ) then 
        moveObject (gate1,2000,x,y, z ) 
    end 
end 
addEventHandler( "onColShapeHit", gatecol, OpenGates ) 
              
function CloseGates (thePlayer) 
    if ( getTeamName(getPlayerTeam(thePlayer)) == teamName ) then 
        moveObject (gate1,2000,x, y, z )---Put here the original position of ur gate before it moves. 
    end 
end 
addEventHandler( "onColShapeLeave", gatecol, CloseGates ) 

Link to comment
Basically, now you have just to define the cordinations x,y,z , roation, add your team name if needed else remove this part and others like object ..etc

click on the functions to read more about them in the wiki.

local gate1 = createObject (Gate ID, x,y,z, rx,ry,rz ) 
local gatecol =  createColCircle (x, y, z)----Put here the new dimensions u move ur gate to. 
local teamName = "Your Team name here" 
                    
function OpenGates (thePlayer) 
    if ( getTeamName(getPlayerTeam(thePlayer)) == teamName ) then 
        moveObject (gate1,2000,x,y, z ) 
    end 
end 
addEventHandler( "onColShapeHit", gatecol, OpenGates ) 
              
function CloseGates (thePlayer) 
    if ( getTeamName(getPlayerTeam(thePlayer)) == teamName ) then 
        moveObject (gate1,2000,x, y, z )---Put here the original position of ur gate before it moves. 
    end 
end 
addEventHandler( "onColShapeLeave", gatecol, CloseGates ) 

Great,it has no errors now

Link to comment
Basically, now you have just to define the cordinations x,y,z , roation, add your team name if needed else remove this part and others like object ..etc

click on the functions to read more about them in the wiki.

local gate1 = createObject (Gate ID, x,y,z, rx,ry,rz ) 
local gatecol =  createColCircle (x, y, z)----Put here the new dimensions u move ur gate to. 
local teamName = "Your Team name here" 
                    
function OpenGates (thePlayer) 
    if ( getTeamName(getPlayerTeam(thePlayer)) == teamName ) then 
        moveObject (gate1,2000,x,y, z ) 
    end 
end 
addEventHandler( "onColShapeHit", gatecol, OpenGates ) 
              
function CloseGates (thePlayer) 
    if ( getTeamName(getPlayerTeam(thePlayer)) == teamName ) then 
        moveObject (gate1,2000,x, y, z )---Put here the original position of ur gate before it moves. 
    end 
end 
addEventHandler( "onColShapeLeave", gatecol, CloseGates ) 

Great,it has no errors now

Link to comment

Dude Gate script is like something you learn at first.. you don't really have to download these silly resources when you can make them yourself using functions which are predefined. like MoveObject().. use your brain and do some math.. I'm not asking for Integral mathematics or differential calculus or something.. Not even 3D geometry.. Just a math or Physical maths to find the time taken to cover a certain distance with a certain velocity. Which is simple. Try making your own resources.. This is something that's DO-able

Link to comment

Dude Gate script is like something you learn at first.. you don't really have to download these silly resources when you can make them yourself using functions which are predefined. like MoveObject().. use your brain and do some math.. I'm not asking for Integral mathematics or differential calculus or something.. Not even 3D geometry.. Just a math or Physical maths to find the time taken to cover a certain distance with a certain velocity. Which is simple. Try making your own resources.. This is something that's DO-able

Link to comment
  • 5 weeks later...
Dude Gate script is like something you learn at first.. you don't really have to download these silly resources when you can make them yourself using functions which are predefined. like MoveObject().. use your brain and do some math.. I'm not asking for Integral mathematics or differential calculus or something.. Not even 3D geometry.. Just a math or Physical maths to find the time taken to cover a certain distance with a certain velocity. Which is simple. Try making your own resources.. This is something that's DO-able

Hahahahahah. I was just going through your old posts for a good laugh and I was hoping that you changed your way of thinking because 2 years passed but nah you're still the same. I wonder why would someone rewrite functions? May God guide you....

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