illestiraqi Posted February 24, 2013 Share Posted February 24, 2013 Can somebody please remove the skins thing. I just want the gates to open if users in the FabulousBloodzGang please help. gate1= createObject ( 969, -488.75805664063, -562.94116210938, 24.461265563965, 0, 0, 180 ) gate2 = createObject ( 969, -488.5793762207, -562.96948242188, 24.451913833618, 0, 0, 0 ) gatecol = createColCircle ( -488.6, -562.94116210938, 24.461265563965, 7 ) function opengates(thePlayer) if ( getTeamName(getPlayerTeam(thePlayer)) == "FabulousBloodzGang" ) then moveObject (gate1, 5000, -495, -562.94116210938, 24.461265563965 ) moveObject (gate2, 5000, -481, -562.96948242188, 24.451913833618 ) end end skins = { [ 46 ] = true, [ 47 ] = true, [ 48 ] = true, [ 59 ] = true, [ 66 ] = true, [ 71 ] = true, [ 113 ] = true, [ 120 ] = true, [ 124 ] = true, [ 147 ] = true, [ 163 ] = true, [ 164 ] = true, [ 171 ] = true, [ 172 ] = true, [ 211 ] = true, [ 217 ] = true, [ 240 ] = true, [ 249 ] = true, } addEventHandler( "onColShapeHit", gatecol, opengates ) function closegates(thePlayer) if ( getTeamName(getPlayerTeam(thePlayer)) == "FabulousBloodzGang" ) then moveObject (gate1, 5000, -488.75805664063, -562.94116210938, 24.461265563965 ) moveObject (gate2, 5000, -488.5793762207, -562.96948242188, 24.451913833618 ) end end addEventHandler( "onColShapeLeave", gatecol, closegates ) Link to comment
X-SHADOW Posted February 24, 2013 Share Posted February 24, 2013 (edited) Edited# gate1= createObject ( 969, -488.75805664063, -562.94116210938, 24.461265563965, 0, 0, 180 ) gate2 = createObject ( 969, -488.5793762207, -562.96948242188, 24.451913833618, 0, 0, 0 ) gatecol = createColCircle ( -488.6, -562.94116210938, 24.461265563965, 7 ) function opengates(hit) if getElementType(hit) =="player" and (getPlayerTeam(getTeamName(hit) == "FabulousBloodzGang" )) then moveObject (gate1, 5000, -495, -562.94116210938, 24.461265563965 ) moveObject (gate2, 5000, -481, -562.96948242188, 24.451913833618 ) outputChatBox(""..getPlayerName(hit).." opened the Gate !", 255, 255, 0, true) end end addEventHandler( "onColShapeHit", gatecol, opengates ) function closegates(hit) if getElementType(hit) =="player" and (getPlayerTeam(getTeamName(hit) == "FabulousBloodzGang" )) then moveObject (gate1, 5000, -488.75805664063, -562.94116210938, 24.461265563965 ) moveObject (gate2, 5000, -488.5793762207, -562.96948242188, 24.451913833618 ) end end addEventHandler( "onColShapeLeave", gatecol, closegates ) Edited February 24, 2013 by Guest Link to comment
squar Posted February 24, 2013 Share Posted February 24, 2013 (edited) local gate1 = createObject ( 969, -488.75805664063, -562.94116210938, 24.461265563965, 0, 0, 180 ) local gate2 = createObject ( 969, -488.5793762207, -562.96948242188, 24.451913833618, 0, 0, 0 ) local gatecol = createColCircle ( -488.6, -562.94116210938, 7 ) function opengates( thePlayer ) local theTeam = getPlayerTeam ( thePlayer ) if getTeamName ( theTeam ) == "FabulousBloodzGang" then moveObject (gate1, 5000, -495, -562.94116210938, 24.461265563965 ) moveObject (gate2, 5000, -481, -562.96948242188, 24.451913833618 ) end end addEventHandler( "onColShapeHit", gatecol, opengates ) function closegates( thePlayer, matchingDimension ) if ( getTeamName(getPlayerTeam(thePlayer)) == "FabulousBloodzGang" ) then moveObject (gate1, 5000, -488.75805664063, -562.94116210938, 24.461265563965 ) moveObject (gate2, 5000, -488.5793762207, -562.96948242188, 24.451913833618 ) end end addEventHandler( "onColShapeLeave", gatecol, closegates ) You mean like this? Edited February 24, 2013 by Guest Link to comment
illestiraqi Posted February 24, 2013 Author Share Posted February 24, 2013 There is a problem. I tested it and gate isn't moving, even before with skin it wasn't moving someone please help! Link to comment
squar Posted February 24, 2013 Share Posted February 24, 2013 I edited mine, try it now Link to comment
X-SHADOW Posted February 24, 2013 Share Posted February 24, 2013 squar You Shout Check if (getElementType(thePlayer) == 'player' then .. Your Code won't Work # and for the one who asking about Moving Gate Check my Post Edited # Link to comment
Jaysds1 Posted February 25, 2013 Share Posted February 25, 2013 try this: gate1= createObject ( 969, -488.75805664063, -562.94116210938, 24.461265563965, 0, 0, 180 ) gate2 = createObject ( 969, -488.5793762207, -562.96948242188, 24.451913833618, 0, 0, 0 ) gatecol = createColCircle ( -488.6, -562.94116210938, 24.461265563965, 7 ) skins ={ [ 46 ] = true, [ 47 ] = true, [ 48 ] = true, [ 59 ] = true, [ 66 ] = true, [ 71 ] = true, [ 113 ] = true, [ 120 ] = true, [ 124 ] = true, [ 147 ] = true, [ 163 ] = true, [ 164 ] = true, [ 171 ] = true, [ 172 ] = true, [ 211 ] = true, [ 217 ] = true, [ 240 ] = true, [ 249 ] = true, } function opengates(thePlayer) if getElementType(thePlayer)!="player" or getTeamName(getPlayerTeam(thePlayer))!="FabulousBloodzGang" or not skins[getElementModel(thePlayer)] then return end moveObject (gate1, 5000, -495, -562.94116210938, 24.461265563965 ) moveObject (gate2, 5000, -481, -562.96948242188, 24.451913833618 ) end addEventHandler( "onColShapeHit", gatecol, opengates ) function closegates(thePlayer) if getElementType(thePlayer)!="player" or getTeamName(getPlayerTeam(thePlayer))!="FabulousBloodzGang" or not skins[getElementModel(thePlayer)] then return end moveObject (gate1, 5000, -488.75805664063, -562.94116210938, 24.461265563965 ) moveObject (gate2, 5000, -488.5793762207, -562.96948242188, 24.451913833618 ) end addEventHandler( "onColShapeLeave", gatecol, closegates ) 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