Jump to content

Resource (ACL group)


DonPro

Recommended Posts

hey. i wondering if there is no easyer way to make an ACL to the resource. i mean, a resource that makes objects in game, and i want it to only be for LWS/ZIP and not all in the game. so isnt there a way to make the resource in ACL so its only works for that group?

    "LWS"> 
        "resource.LWS-ZIP_system"> 
    

Link to comment
addEventHandler("onPlayerLogin", root, 
function(_, account) 
    local accName = getAccountName(account) 
    if isObjectInACLGroup("user."..accName, aclGetGroup("LWS")) then 
        triggerClientEvent(source, "createTheObject", source) 
    end 
end) 

addEvent("createTheObject", true) 
addEventHandler("createTheObject", root, 
function() 
    createObject(.....) 
    createObject(.....) 
    createObject(.....) 
    createObject(.....) 
    createObject(.....) 
    createObject(.....) 
    createObject(.....) 
end) 

Link to comment
addEventHandler("onPlayerLogin", root, 
function(_, account) 
    local accName = getAccountName(account) 
    if isObjectInACLGroup("user."..accName, aclGetGroup("LWS")) then 
        triggerClientEvent(source, "createTheObject", source) 
    end 
end) 

addEvent("createTheObject", true) 
addEventHandler("createTheObject", root, 
function() 
    createObject(.....) 
    createObject(.....) 
    createObject(.....) 
    createObject(.....) 
    createObject(.....) 
    createObject(.....) 
    createObject(.....) 
end) 

addEventHandler("onPlayerLogin", root, 
function(_, account) 
    local accName = getAccountName(account) 
    if isObjectInACLGroup("user.Mark"..accName, aclGetGroup("LWS")) then 
        triggerClientEvent(source, "createTheObject", source) 
    end 
end) 

addEvent("createTheObject", true) 
addEventHandler("createTheObject", root, 
function() 
    createObject(2943) -- Here you mean the object id right? 
    createObject(.....) 
    createObject(.....) 
    createObject(.....) 
    createObject(.....) 
    createObject(.....) 
    createObject(.....) 
end) 

Link to comment

I don't understand, post your code so i can see what you're talking about.

And by the way here you don't need to put your account name because it will be there already by the function getAccountName.

if isObjectInACLGroup("user.Mark"..accName, aclGetGroup("LWS")) then 

Link to comment
I don't understand, post your code so i can see what you're talking about.

And by the way here you don't need to put your account name because it will be there already by the function getAccountName.

if isObjectInACLGroup("user.Mark"..accName, aclGetGroup("LWS")) then 

ok, u know Resource. i wanna connect it to GROUP LWS so ONLY (LWS) can use it.

Link to comment
I don't understand, post your code so i can see what you're talking about.

And by the way here you don't need to put your account name because it will be there already by the function getAccountName.

if isObjectInACLGroup("user.Mark"..accName, aclGetGroup("LWS")) then 

Here is the meta of the resource i want to CONNECT to ACL group so only people in LWS can use it.

"Rars" description="in game object adder" version="0.2" type="script" />  
"models.xml" type="client"/> 

Link to comment
You must edit your code and put a check to know if the player are in the group or not before he able to add object.

You need the function to check the group:

isObjectInACLGroup 

where do i put it? ;S dude if u have skype pleas add me: fredthemasterman

Link to comment
How the hell i can tell if i see no code at all? :bazooka:

its maby easyer now bro. i want this spawn to be connected to ACL group LWS so players whos not a part of LWS wont be allowed to spawn.

  
  
    "LasVenturasLWS" > 
     
  
"LWS" friendlyfire="true" > 
            "Hells angels the gang of the best!" /> 
            "177" green="204" blue="0" /> 
            "LWS Member" id="290" > 
                "709.2236328125" y="1818.021484375" z="-9.96" rot="48.129089355469" /> 
            
            "LWS Member" id="98" > 
                "709.2236328125" y="1818.021484375" z="-9.96" rot="48.129089355469" /> 
            
            "LWS Member" id="126" > 
                "709.2236328125" y="1818.021484375" z="-9.96" rot="48.129089355469" /> 
            
            "1" ammo="1" /> 
            "4" ammo="1" /> 
            "24" ammo="100" /> 
            "27" ammo="130" /> 
            "31" ammo="800" /> 
            
                "1768" y="-1544" z="15" /> 
                "1768" y="-1544" z="15" /> 
            
        
  
  
  
    
  
   
  

Link to comment
How the hell i can tell if i see no code at all? :bazooka:

Hey aigen. ehm i got a question! when i wanna connect this object ingame creator and wanna connect it to my own GUI should i just double this line and type in the GUI name?

triggerClientEvent(source, "createTheObject", source) 
triggerClientEvent(source, "GUI", source) <--- like that? 

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