Jump to content

With staff area


Toffbrown

Recommended Posts

Like this?

local groupName = "Admin" 
local x, y, z = 0, 0, 0 
local colShape = createColRectangle ( 2160.93921, 2160.93921, 10000, 10000 ) 
addEventHandler("onColShapeHit",root,function ( element ) 
  
addEventHandler ( "onColShapeHit", colShape, 
function ( theElm ) 
if ( getElementType ( theElm ) == "player" ) and isObjectInACLGroup ( "user.".. getAccountName ( getPlayerAccount ( hitPlayer ) ), aclGetGroup ( "Admin" ) ) then 
elseif function commitSuicide ( sourcePlayer ) 
    killPed ( sourcePlayer, sourcePlayer ) 
end 
local spawnX, spawnY, spawnZ = -2026.17480, 156.90236, 29.03906 
             spawnPlayer(source, spawnX, spawnY, spawnZ)     
             fadeCamera(source, true) 
    setCameraTarget(source, source) 
             outputChatBox("Do Not Enter the JJ's Staff Base", source)s 
end 
addEventHandler("onPlayerJoin", getRootElement(), joinHandler) 
end 
  

Link to comment

Does it work?

local groupName = "Admin" 
local colShape = createColRectangle ( 2160.93921, 2160.93921, 10000, 10000 ) 
    
function colShapeEnter()  
local accountname = getAccountName (getPlayerAccount(thePlayer)) 
    if isObjectInACLGroup ( "user." .. accountname, aclGetGroup (groupName)) then 
        outputChatBox ("You entered the base admin",source) 
    else 
        outputChatBox ("You are not admin, to enter this base",source) 
        killPed ( source ) 
    end 
end 
addEventHandler ( "onColShapeHit", colShape, colShapeEnter ) 

Link to comment

And now?

local groupName = "Admin" 
local colShape = createColRectangle ( 2160.93921, 2160.93921, 10000, 10000 ) 
    
function colShapeEnter(thePlayer)  
local accountname = getAccountName (getPlayerAccount(thePlayer)) 
    if isObjectInACLGroup ( "user." .. accountname, aclGetGroup (groupName)) then 
        outputChatBox ("You entered the base admin",thePlayer) 
    else 
        outputChatBox ("You are not admin, to enter this base",thePlayer) 
        killPed ( thePlayer ) 
    end 
end 
addEventHandler ( "onColShapeHit", colShape, colShapeEnter ) 

Link to comment
local groupName = "Admin" 
local colShape = createColRectangle ( 2160.93921, 2160.93921, 10000, 10000 ) 
    
function colShapeEnter(thePlayer) 
local accountname = getAccountName (getPlayerAccount(thePlayer)) 
    if isObjectInACLGroup ( "user." .. accountname, aclGetGroup (groupName)) then 
        outputChatBox ("You entered the base admin",thePlayer) 
    else 
        outputChatBox ("You are not admin, to enter this base",thePlayer) 
        killPed ( thePlayer ) 
    end 
end 
addEventHandler ( "onColShapeHit", colShape, colShapeEnter ) 

Here is ToffBrown. Thanks Solid

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