Jump to content

Private base for team


Kors

Recommended Posts

alanlar = {
{ -2627, 2273, 5, 320, 200, 50, -- x, y, z, width, height, depth
{
    {-2658.91064, 2326.26294, 23.60156}, -- outside pos
    {-2590.89331, 2244.58374, 4.98438} -- outside pos
}, 
"Admin", "ACL"}, -- Acl Group and Setting

{ -2682.15820, 2162.93921, 50, 100, 100, 50,   -- x, y, z, width, height, depth
{
    {-2669.75488, 2146.68677, 55.42969},  -- outside pos
    {-2697.34961, 2170.46924, 55.79964} -- outside pos
},  
"Admin", "Team"}, -- Acl Group and Setting

}	


for i,v in pairs(alanlar) do
	    local x, y, z, width, height, depth, disari, grup, ayar = unpack(v) 
        rad = createRadarArea ( x, y, width, height, 255, 0, 0, 170, root )
	    col = createColCuboid ( x, y, z, width, height, depth)
	    addEventHandler("onColShapeHit", col, function(giren)
	    random = math.random(#disari)
		if getElementType(giren) == "vehicle" then 
             aracSahibi = getVehicleController(giren) 
        end		
		local hesap = getAccountName(getPlayerAccount(aracSahibi or giren)) 
		if ayar == "ACL" and not isObjectInACLGroup("user." ..hesap, aclGetGroup(grup)) then 
			setElementPosition(giren, disari[random][1],disari[random][2],disari[random][3])
			outputChatBox("You cant enter this zone.", giren, 255,0,0)	
		elseif ayar == "Team" then  
			local takim = getPlayerTeam(aracSahibi or giren) 
			if not takim then setElementPosition(giren, disari[random][1],disari[random][2],disari[random][3])  return end 
			if takim and getTeamName(takim) ~= grup then 
				setElementPosition(giren, disari[random][1],disari[random][2],disari[random][3])
				outputChatBox("You cant enter this zone.", giren, 255,0,0)	
			end
		end
    end)	
end	

can you try this ?

  • Like 1
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...