Jump to content

Daz

Members
  • Posts

    17
  • Joined

  • Last visited

Everything posted by Daz

  1. Above a teams head such as "Admin"
  2. +1 Would be extremely helpful . Whoever does it will be amazing
  3. I have no idea how to go about this one. We want to have an image above a certain teams head that stays there even when the move any ideas?
  4. After a lot of experimenting and frustration I got it thanks to you guys I cant THANK YOU ENOUGH it works finallyyyyy
  5. The only problem im finding is that the colshape is above ground im trying to change the Z coord for it but doesn't make a difference I think the colshape is spawning itself halfway up the Gate./ local colshape = createColTube ( x, y, z - 1, 10, 17 ) -- Create the gate colshape
  6. Thank you for writing this code its extremely helpful and I understand it the gates open and close but im struggling to find where I can edit each gates colshape at because they are in weird places thank you again
  7. a Looping table? because I can see a guide on youtube for that otherwise I don't really know what im doing
  8. Still no luck door = createObject ( 3037, 256.399, 1843.699, 9.899, 0, 0, 0) local cols = { {"Military",256.399, 1843.699, 9.899, 20, 3}, {"TEAM2",256.399, 1843.699, 9.899, 20, 3} } for _, v in ipairs(cols) do local name,256.399, 1843.699, 9.899 = unpack ( v ) -----??????? what is this tubes = createColTube(256.399, 1846.699, 7.900, 5, 3) setElementData(tubes,"team",name) end addEventHandler("onMarkerHit",tubes, function (hit,dim) if getElementType(hit) == 'player' then local team = getPlayerTeam(hit) local teamname = getTeamName(team) if 'Military' == getElementData(source,"team") then moveObject ( door, 2200, 256.399, 1843.699, 13 ) end end end)
  9. I filled out that template you give me maybe I am putting wrong coordinates for different places but no gate showed local cols = { {"Military",256.399, 1843.699, 9.899, 20, 3}, {"TEAM2",256.399, 1843.699, 9.899, 20, 3} } for _, v in ipairs(cols) do local name,256.399, 1843.699, 9.899 = unpack ( v ) -----??????? what is this tubes = createColTube(256.399, 1846.699, 7.900, 5, 3) setElementData(tubes,"team",name) end addEventHandler("onMarkerHit",tubes, function (hit,dim) if getElementType(hit) == 'player' then local team = getPlayerTeam(hit) local teamname = getTeamName(team) if 'Military' == getElementData(source,"team") then moveObject ( door, 2200, 256.399, 1843.699, 13 ) end end end)
  10. Hi im sorry I don't understand can somebody show me an example of 2 gates (locked to team)in the same lua. And which bits I should change thank you if anyone can
  11. Like this ? if ( getElementType ( pla ) == "player" ) then 14. 15. local team = getPlayerTeam ( pla ) 16. 17. local teamName = ( team and getTeamName ( team ) or "" ) 18. 19. if ( teamName == "Desert Eagles" ) then
  12. with this example how would I make it locked to a team like my original lua if you know?
  13. Ok I am very knew to this so I need to make a table that loops ?? would this still follow the same layout you helped me with for the gates locked to teams.
  14. Is it possible to make multiple gates in a single lua I have tried it and they are interfering with each other and messing up. Like one gate will teleport to the other etc If you know how to make multiple gates work in the same lua please help thanks here is the lua I am using -- 1ST GATE VEHICLE SECTION MILITARY BASE. col = createColTube (110.199, 1757.300, 17, 20, 3) -- enter your cooderates here for your colshape please note 10 and 3 is to do with the size of the shape. door = createObject ( 980, 110.299, 1756.400, 19.399, 0, 0, 90) -- enter the ID of the object followed by the coordinates -- note the rotx y and z may not be required so you just remove these. x y and z is where you would put your cordinates. function Open ( pla ) if ( getElementType ( pla ) == "player" ) then local team = getPlayerTeam ( pla ) local teamName = ( team and getTeamName ( team ) or "" ) if ( teamName == "Desert Eagles" ) then moveObject ( door, 2200, 110.299, 1756.400, 25.5 ) -- here is where you enter the coordinatess of the new location of the object, 2200 = the speed of the movent. end end end addEventHandler ( "onColShapeHit", col, Open) function Close ( pla ) if ( getElementType ( pla ) == "player" ) then local team = getPlayerTeam ( pla ) local teamName = ( team and getTeamName ( team ) or "" ) if ( teamName == "Desert Eagles" ) then moveObject ( door, 2951, 110.299, 1756.400, 19.399 ) -- here is where you copy the coordinates of the orginal location of the object, 2951 = the timer of movent. end end end addEventHandler ( "onColShapeLeave", col, Close ) ------------------------------------------------------------------------------------------------------------------------------------------------ --2nd Gate col1 = createColTube (290.600, 1821.400, 17.600, 20, 3) -- enter your cooderates here for your colshape please note 10 and 3 is to do with the size of the shape. door1 = createObject ( 980, 290.700, 1821.099, 19.399, 0, 0, 89.999) -- enter the ID of the object followed by the coordinates -- note the rotx y and z may not be required so you just remove these. x y and z is where you would put your cordinates. function Open ( pla ) if ( getElementType ( pla ) == "player" ) then local team = getPlayerTeam ( pla ) local teamName = ( team and getTeamName ( team ) or "" ) if ( teamName == "Desert Eagles" ) then moveObject ( door1, 2200, 290.700, 1821.099, 25.5 ) -- here is where you enter the coordinatess of the new location of the object, 2200 = the speed of the movent. end end end addEventHandler ( "onColShapeHit", col, Open) function Close ( pla ) if ( getElementType ( pla ) == "player" ) then local team = getPlayerTeam ( pla ) local teamName = ( team and getTeamName ( team ) or "" ) if ( teamName == "Desert Eagles" ) then moveObject ( door1, 2951, 290.700, 1821.099, 19.399 ) -- here is where you copy the coordinates of the orginal location of the object, 2951 = the timer of movent. end end end addEventHandler ( "onColShapeLeave", col1, Close )
  15. Daz

    [Help] With Gates

    Thank you for the help It works perfectly !!!!
  16. Daz

    [Help] With Gates

    Thanks for the quick reply I loaded the lua and meta onto the server and it hasn't worked there is no gate
  17. Ok here is my gate.lua file it currently works for certain ACL Groups I want the gate to work for Teams such as military So the gate only opens for a team I have put in the lua and no one else Do you know how to do this if so all help would be appreciated Thanks Heres the lua [lua]col = createColTube (110.199, 1757.300, 17, 20, 3) -- enter your cooderates here for your colshape please note 10 and 3 is to do with the size of the shape. root = getRootElement () door = createObject ( 980, 110.299, 1756.400, 19.399, 0, 0, 90) -- enter the ID of the object followed by the coordinates -- note the rotx y and z may not be required so you just remove these. x y and z is where you would put your cordinates. addEvent ( "Open", true ) function Open ( pla ) if getElementType ( pla ) == "player" then if vehicle or not vehicle then aclGroupListACL ( aclgroup, Military ) if --here you can alter the group from Admin to whatever you require in your server but remember the rest must be the same i.e change everything where it says Admin to your desired group and add the users to that group. isObjectInACLGroup ( "user."..getPlayerName(pla), aclGetGroup ( "Military" ) ) then moveObject (door, 2200, 110.299, 1756.400, 25.5) -- here is where you enter the coordinatess of the new location of the object, 2200 = the speed of the movent. else return 0 end end end end addEventHandler ( "onColShapeHit", col, Open) addEventHandler ( "Open", root, Open) function Close ( pla ) if getElementType ( pla ) == "player" then if vehicle or not vehicle then aclGroupListACL ( aclgroup, Military ) if isObjectInACLGroup ( "user."..getPlayerName(pla), aclGetGroup ( "Military" ) ) then moveObject (door, 2951, 110.299, 1756.400, 19.399) -- here is where you copy the coordinates of the orginal location of the object, 2951 = the timer of movent. else return 0 end end end end addEventHandler ( "onColShapeLeave", col, Close ) addEventHandler ( "Close", root, Close) [/lua]
×
×
  • Create New...