illestiraqi Posted March 5, 2013 Share Posted March 5, 2013 I am using Castillo's gang system meaning I want this to all be changed into castillo's gang system thing. If player is in FBI gang than they are aloud to take this job and have the 286 skin. local Skinmarker = createMarker(919.59997558594, -1004.299987793, 37, "cylinder", 2, 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
Sasu Posted March 5, 2013 Share Posted March 5, 2013 Try this: local Skinmarker = createMarker(919.59997558594, -1004.299987793, 37, "cylinder", 2, 33, 33, 33, 255) -- umkleide local theTeam = createTeam( "FBI", 31, 31, 31 ) addEventHandler("onMarkerHit", Skinmarker, function(hitElement) if getElementType(hitElement) ~= 'player' then return end local gang = exports [ "gang_system" ]:getPlayerGang ( hitElement ) if ( gang == "FBI" ) then setElementModel(hitElement, 286) setPlayerTeam(hitElement, theTeam) end ) Link to comment
illestiraqi Posted March 5, 2013 Author Share Posted March 5, 2013 Try this: local Skinmarker = createMarker(919.59997558594, -1004.299987793, 37, "cylinder", 2, 33, 33, 33, 255) -- umkleide local theTeam = createTeam( "FBI", 31, 31, 31 ) addEventHandler("onMarkerHit", Skinmarker, function(hitElement) if getElementType(hitElement) ~= 'player' then return end local gang = exports [ "gang_system" ]:getPlayerGang ( hitElement ) if ( gang == "FBI" ) then setElementModel(hitElement, 286) setPlayerTeam(hitElement, theTeam) end ) not working please fix. Link to comment
iPrestege Posted March 5, 2013 Share Posted March 5, 2013 local Skinmarker = createMarker(919.59997558594, -1004.299987793, 37, "cylinder", 2, 33, 33, 33, 255) -- umkleide local theTeam = createTeam( "FBI", 31, 31, 31 ) addEventHandler("onMarkerHit", Skinmarker, function(hitElement) if getElementType(hitElement) ~= 'player' then return end local gang = exports [ "gang_system" ]:getPlayerGang ( hitElement ) if ( gang == "FBI" ) then setElementModel(hitElement, 286) setPlayerTeam(hitElement, theTeam) end end ) He has forgotten the end. Link to comment
Castillo Posted March 5, 2013 Share Posted March 5, 2013 @illestiraqi: Make sure you have the latest gang system, because older ones doesn't have the exported function: getPlayerGang . Link to comment
Sasu Posted March 6, 2013 Share Posted March 6, 2013 @Sasuke*, you forgot one "end". Yes. Sorry 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