Jump to content

Gates(ACL group)


Vladimir5

Recommended Posts

  
local marker1 = createMarker( -1530, 483, 6.3, "cylinder", 10, 0, 255, 255, 0 ) 
local gate1 = createObject( 976, -1534.4836425781, 482.15185546875, 6.1875 ) 
-- Local Functions 
  
  
function openGate1( hitElement ) 
if (getElementType(hitElement) == "player" ) then 
moveObject( gate1, 1500, -1534.4836425781, 482.15185546875, 2.9375 ) 
end 
end 
addEventHandler( "onMarkerHit", marker1, openGate1 ) 
  
function closeGate1( leftElement ) 
if (getElementType(leftElement) == "player" ) then 
moveObject( gate1, 1500, -1534.4836425781, 482.15185546875, 6.1875 ) 
end 
end 
addEventHandler( "onMarkerLeave", marker1, closeGate1 ) 
  

It's code...

Of owner SAUR's

Its ok?

Edited by Guest
Link to comment

It's code on gates with password...

I need auto close/open gates...

Gates with Marker:)

local marker1 = createMarker( -1530, 483, 6.3, "cylinder", 10, 0, 255, 255, 0 )

local gate1 = createObject( 976, -1534.4836425781, 482.15185546875, 6.1875 )

local marker1 = createMarker( -1530, 483, 6.3, "cylinder", 10, 0, 255, 255, 0 ) 
local gate1 = createObject( 976, -1534.4836425781, 482.15185546875, 6.1875 ) 
-- Local Functions 
  
  
function openGate1( hitElement ) 
if (getElementType(hitElement) == "player" ) then 
moveObject( gate1, 1500, -1534.4836425781, 482.15185546875, 2.9375 ) 
end 
end 
addEventHandler( "onMarkerHit", marker1, openGate1 ) 
  
function closeGate1( leftElement ) 
if (getElementType(leftElement) == "player" ) then 
moveObject( gate1, 1500, -1534.4836425781, 482.15185546875, 6.1875 ) 
end 
end 
addEventHandler( "onMarkerLeave", marker1, closeGate1 ) 

Please help me!

How do to gates open on ACL grouP!?

Edited by Guest
Link to comment
-- Gate object, which will be created when the resource is started 
local gate = createObject(985, -1534.4836425781, 482.15185546875, 6.1875, 0, 0, 270.27014160156) 
  
-- Marker, which will be created when the resource is started 
local marker = createMarker(-1530, 483, 6.3, "cylinder", 4, 255, 255, 255, 140) 
  
-- Function, which moves the gate when you hit the marker and you have a right to kick a player 
function moveGate(hitPlayer, matchingDimension) 
    if hasObjectPermissionTo(hitPlayer, "function.kickPlayer") then -- Check if the player has permission to kick a player 
        moveObject(gate, 5000, -1534.4836425781, 482.15185546875, 2.9375) -- Function that moves the gate away 
        setTimer(moveBack, 5000, 1) -- Timer that triggers when the gate is moved 
    end 
end 
addEventHandler("onMarkerHit", marker, moveGate) -- When the player hits a marker with name 'marker', the function with name 'moveGate' will be triggered 
  
-- Function that moves the gate back to it's position 
function moveBack() 
    moveObject(gate, 5000, -1534.4836425781, 482.15185546875, 6.1875) 
end 

Edited by Guest
Link to comment
local gate = createObject(985, -1534.4836425781, 482.15185546875, 6.1875, 0, 0, 270.27014160156) 
local marker = createMarker(-1530, 483, 6.3, "cylinder", 4, 255, 255, 255, 140) 
  
function moveGate(hitPlayer, matchingDimension) 
    if hasObjectPermissionTo(hitPlayer, "function.kickPlayer") then 
        moveObject(gate, 5000, -1534.4836425781, 482.15185546875, 2.9375) 
        setTimer(moveBack, 5000, 1) 
    end 
end 
addEventHandler("onMarkerHit", marker, moveGate) 
  
function moveBack() 
    moveObject(gate, 5000, -1534.4836425781, 482.15185546875, 6.1875) 
end 

Hm...

Where's I can add me to permissions?

Link to comment

Moderators and Administrators are able to kick players from your server. The script checks if the player who triggers the moving gate function has permission to kick a player.

In another words, it checks if you're an admin or moderator.

It only works for admins and moderators, not for everyone.

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