Jokeℝ1472771893 Posted May 14, 2012 Posted May 14, 2012 local Skinmarker = createMarker(931.40002441406, -1030.9000244141, 30.89999961853, "cylinder", 1.5, 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 how to give weapon here?
Castillo Posted May 14, 2012 Posted May 14, 2012 local Skinmarker = createMarker ( 931.40002441406, -1030.9000244141, 30.89999961853, "cylinder", 1.5, 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 ) giveWeapon ( hitElement, 29, 500, true ) -- Give him a MP5 with 500 bullets and set it as current weapon. end ) function isFBI ( thePlayer ) if ( not thePlayer ) then return false end local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) return isObjectInACLGroup ("user."..accName, aclGetGroup ( "FBI" ) ) end
Jokeℝ1472771893 Posted May 15, 2012 Author Posted May 15, 2012 But it gives all player i need that it give weapon only ACL group member
Castillo Posted May 15, 2012 Posted May 15, 2012 It should work, I only changed the "isFBI" function to return the boolean of: isObjectInACLGroup.
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