iFoReX Posted July 25, 2012 Share Posted July 25, 2012 why the zombies spawn and enter to my colcuboid ? safecol = createColCuboid ( 300.177734375, -2226.9956054688, 17.64, 300, 200, 60 ) safecol2 = createColCuboid (190.32346, 1946.84485,17.7, 200, 150, 60 ) safeZoneRadar = createRadarArea ( 57.57347, 1768.47424, 300, 200, 0, 255, 0, 0 ) safeZoneRadar2 = createRadarArea ( 190.32346, 1946.84485, 200, 150, 0, 0, 0, 0 ) setElementData (safecol, "zombieProof", true) setElementData (safecol2, "zombieProof", true) function enterZone( hitElement, matchingDimension) if source == safecol or source == safecol2 then if getElementType(hitElement) == "ped" then killPed(hitElement) local accName = getAccountName ( getPlayerAccount ( hitElement ) ) if not isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then killPed(hitElement) end end end end addEventHandler( "onColShapeHit", root, enterZone ) Link to comment
Castillo Posted July 25, 2012 Share Posted July 25, 2012 Because the "zombieProof" element data must be used on the radar areas, not on the colshapes. Link to comment
iFoReX Posted July 26, 2012 Author Share Posted July 26, 2012 why the players can walk in my area ? Link to comment
Castillo Posted July 26, 2012 Share Posted July 26, 2012 Because you are checking if the hit element is a ped. if getElementType(hitElement) == "ped" then There. Link to comment
iFoReX Posted July 26, 2012 Author Share Posted July 26, 2012 safecol = createColCuboid ( 300.177734375, -2226.9956054688, 17.64, 300, 200, 60 ) safecol2 = createColCuboid (190.32346, 1946.84485,17.7, 200, 150, 60 ) safecol3 = createColCuboid (-398.96045, 1502.05359,75.35696, 200, 150, 60 ) safeZoneRadar = createRadarArea ( 57.57347, 1768.47424, 300, 200, 0, 255, 0, 0 ) safeZoneRadar2 = createRadarArea ( 190.32346, 1946.84485, 200, 150, 0, 0, 0, 0 ) safeZoneRadar3 = createRadarArea ( -398.96045, 1502.05359, 200, 150, 0, 0, 120, 0 ) setElementData (safeZoneRadar, "zombieProof", true) setElementData (safeZoneRadar2, "zombieProof", true) setElementData (safeZoneRadar3, "zombieProof", true) function enterZone( hitElement, matchingDimension) if source == safecol or source == safecol2 then local accName = getAccountName ( getPlayerAccount ( hitElement ) ) if getElementType(hitElement) == "ped" or not isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then killPed(hitElement) end end end addEventHandler( "onColShapeHit", root, enterZone ) addEventHandler("onColShapeHit",root,function(hitElement,matchingDimension) if source == safecol3 then if getElementType(hitElement) == "ped" then killPed(hitElement) end end end ) ? Link to comment
scratcher911 Posted July 26, 2012 Share Posted July 26, 2012 if getElementType(hitElement) == "player" or not isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then Link to comment
Al3grab Posted July 26, 2012 Share Posted July 26, 2012 safecol = createColCuboid ( 300.177734375, -2226.9956054688, 17.64, 300, 200, 60 ) safecol2 = createColCuboid (190.32346, 1946.84485,17.7, 200, 150, 60 ) safecol3 = createColCuboid (-398.96045, 1502.05359,75.35696, 200, 150, 60 ) safeZoneRadar = createRadarArea ( 57.57347, 1768.47424, 300, 200, 0, 255, 0, 0 ) safeZoneRadar2 = createRadarArea ( 190.32346, 1946.84485, 200, 150, 0, 0, 0, 0 ) safeZoneRadar3 = createRadarArea ( -398.96045, 1502.05359, 200, 150, 0, 0, 120, 0 ) setElementData (safeZoneRadar, "zombieProof", true) setElementData (safeZoneRadar2, "zombieProof", true) setElementData (safeZoneRadar3, "zombieProof", true) function enterZone( hitElement, matchingDimension) if source == safecol or source == safecol2 then if getElementType(hitElement) == "ped" then killPed(hitElement) elseif getElementType(hitElement) == "player" then local acc = getPlayerAccount(hitElement) -- if isGuestAccount(acc) then return end -- local accName = getAccountName(acc) if not isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then killPed(hitElement) end end end end addEventHandler( "onColShapeHit", root, enterZone ) addEventHandler("onColShapeHit",root,function(hitElement,matchingDimension) if source == safecol3 then if getElementType(hitElement) == "ped" then killPed(hitElement) end end end ) Link to comment
top sniper Posted July 27, 2012 Share Posted July 27, 2012 all can enter yes ,, zombieProof will stop spawning the zombie in the radar arena only Link to comment
iFoReX Posted July 27, 2012 Author Share Posted July 27, 2012 local accName = getAccountName(acc) if not isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then killPed(hitElement) are you kidding me ? Link to comment
Al3grab Posted July 27, 2012 Share Posted July 27, 2012 local accName = getAccountName(acc) if not isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then killPed(hitElement) are you kidding me ? You should kill the players without account too if isGuestAccount(acc) then killPed(hitElement) return end Link to comment
iFoReX Posted July 27, 2012 Author Share Posted July 27, 2012 all players can enter to the area Link to comment
Al3grab Posted July 27, 2012 Share Posted July 27, 2012 all players can enter to the area Any error @ /debugscript 3 ? Link to comment
Kenix Posted July 27, 2012 Share Posted July 27, 2012 Check conditions via outputChatBox for example. Link to comment
iFoReX Posted July 27, 2012 Author Share Posted July 27, 2012 it not have errors in debugscript 3 al3grab Link to comment
Al3grab Posted July 28, 2012 Share Posted July 28, 2012 safecol = createColCuboid ( 300.177734375, -2226.9956054688, 17.64, 300, 200, 60 ) safecol2 = createColCuboid (190.32346, 1946.84485,17.7, 200, 150, 60 ) safecol3 = createColCuboid (-398.96045, 1502.05359,75.35696, 200, 150, 60 ) safeZoneRadar = createRadarArea ( 57.57347, 1768.47424, 300, 200, 0, 255, 0, 0 ) safeZoneRadar2 = createRadarArea ( 190.32346, 1946.84485, 200, 150, 0, 0, 0, 0 ) safeZoneRadar3 = createRadarArea ( -398.96045, 1502.05359, 200, 150, 0, 0, 120, 0 ) setElementData (safeZoneRadar, "zombieProof", true) setElementData (safeZoneRadar2, "zombieProof", true) setElementData (safeZoneRadar3, "zombieProof", true) function enterZone( hitElement, matchingDimension) if source == safecol or source == safecol2 or source == safecol3 then if getElementType(hitElement) == "ped" then killPed(hitElement) elseif getElementType(hitElement) == "player" then local acc = getPlayerAccount(hitElement) -- if isGuestAccount(acc) then killPed(hitElement) return end -- local accName = getAccountName(acc) if not isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then killPed(hitElement) end end end end addEventHandler( "onColShapeHit", root, enterZone ) Tested and worked for me , i tested it on this colshape : 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