Jump to content

Dayz gang gate help


Fox261098

Recommended Posts

Hello i a gate script but donk know how to make it for a group on dayz i uses regular dayz gang sistem 

Code

  1. local gate = createObject ( 980,214,1875.5,13.800000190735,0,0,0)
  2.  
  3. function opengate(player)
  4. moveObject ( gate, 4000, 204,1876.0999755859,13.800000190735)
  5. end
  6.  
  7. addCommandHandler ("ogate", opengate)
  8.  
  9. function closegate (player)
  10. moveObject ( gate, 4000, 214,1875.5,13.800000190735)                   
  11. end        
  12.                
  13. addCommandHandler("cgate", closegate )
  14.  
  15.  
  16.  
  17.  
Link to comment
local gate = createObject ( 980,214,1875.5,13.800000190735,0,0,0) 
  
function opengate(player) 
moveObject ( gate, 4000, 204,1876.0999755859,13.800000190735) 
end 
  
addCommandHandler ("ogate", opengate) 
  
function closegate (player) 
moveObject ( gate, 4000, 214,1875.5,13.800000190735)                     
end          
                 
addCommandHandler("cgate", closegate ) 
  
  

now its better

Link to comment

There you go:

local gate = createObject(980, 214, 1875.5, 13.800000190735, 0, 0, 0);
local thegang = "THEGANGNAME";

addCommandHandler("ogate", function(player)
	local gang = getElementData(player, "gang") or false;
	if (gang and gang == thegang) then
		moveObject(gate, 4000, 204, 1876.0999755859, 13.800000190735);
	end
end);

addCommandHandler("cgate", function(player)
	local gang = getElementData(player, "gang") or false;
	if (gang and gang == thegang) then
		moveObject(gate, 4000, 214, 1875.5, 13.800000190735);
	end
end);

 

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