DonPro Posted June 12, 2014 Share Posted June 12, 2014 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
TAPL Posted June 12, 2014 Share Posted June 12, 2014 This not going to work, you need to use server side to check the players group and then trigger to client side to create the objects. Link to comment
DonPro Posted June 12, 2014 Author Share Posted June 12, 2014 This not going to work, you need to use server side to check the players group and then trigger to client side to create the objects. can u show me and example? Link to comment
TAPL Posted June 12, 2014 Share Posted June 12, 2014 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
DonPro Posted June 12, 2014 Author Share Posted June 12, 2014 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
TAPL Posted June 12, 2014 Share Posted June 12, 2014 object id, the positions and the rotation if you needed it. Link to comment
DonPro Posted June 12, 2014 Author Share Posted June 12, 2014 object id, the positions and the rotation if you needed it. no thanks i have a object gui with everything there how do i connect the resource to the ACL LWS group?? Link to comment
TAPL Posted June 12, 2014 Share Posted June 12, 2014 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
DonPro Posted June 12, 2014 Author Share Posted June 12, 2014 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
DonPro Posted June 12, 2014 Author Share Posted June 12, 2014 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
TAPL Posted June 12, 2014 Share Posted June 12, 2014 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 Link to comment
DonPro Posted June 12, 2014 Author Share Posted June 12, 2014 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
TAPL Posted June 12, 2014 Share Posted June 12, 2014 How the hell i can tell if i see no code at all? Link to comment
DonPro Posted June 12, 2014 Author Share Posted June 12, 2014 How the hell i can tell if i see no code at all? ill send you the script over skype. Link to comment
DonPro Posted June 12, 2014 Author Share Posted June 12, 2014 How the hell i can tell if i see no code at all? 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
DonPro Posted June 14, 2014 Author Share Posted June 14, 2014 How the hell i can tell if i see no code at all? 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now