illestiraqi Posted June 11, 2012 Share Posted June 11, 2012 This script is connected to ACL Group and when I created the ACL group this is how it looked like: (My Username is illestiraqi) Is there anything wrong with LUA file, ACL Group, or Both? For me they seem alright... but I just want to have it connected to the ACL group please local Skinmarker = createMarker(919.59997558594, -1004.299987793, 37, "cylinder", 1.0, 33, 33, 33, 255) -- umkleide local theTeam = createTeam( "FBI", 31, 31, 31 ) addEventHandler("onMarkerHit", Skinmarker, function(hitElement) if(isPedInVehicle(hitElement)) then return end if not(isFBI(hitElement)) then return end setElementModel(hitElement, 286) setPlayerTeam(hitElement, theTeam) end) function isFBI(thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "FBI" ) ) then return true; else return false; end end Link to comment
Castillo Posted June 12, 2012 Share Posted June 12, 2012 I don't see anything wrong in the Lua script, do you have any debug script error? is the script set as server side in the meta.xml? Link to comment
BinSlayer1 Posted June 12, 2012 Share Posted June 12, 2012 the only thing wrong with the lua script that will give you some nasty debug errors too is that you need to check the element type and make sure it's a player Use this: if getElementType(hitElement) ~= 'player' then return end Put it in the first line of the function Link to comment
illestiraqi Posted June 12, 2012 Author Share Posted June 12, 2012 For me it seemed alright but its just not working anyone help please Link to comment
X-SHADOW Posted June 12, 2012 Share Posted June 12, 2012 Make it server-Side on meta.xml local Skinmarker = createMarker(919.59997558594, -1004.299987793, 37, "cylinder", 1.0, 33, 33, 33, 255) -- umkleide local theTeam = createTeam( "FBI", 31, 31, 31 ) addEventHandler("onMarkerHit", Skinmarker, function(hitElement) if getElementType(hitElement) ~= 'player' then return end if not(isFBI(hitElement)) then return end setElementModel(hitElement, 286) setPlayerTeam(hitElement, theTeam) end) function isFBI(thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "FBI" ) ) then return true; else return false; end end 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