iFoReX Posted July 25, 2012 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 ) elMota/elFoReX De Vuelta En MTA *---------* Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3 https://www.youtube.com/user/KillersGPs
Castillo Posted July 25, 2012 Posted July 25, 2012 Because the "zombieProof" element data must be used on the radar areas, not on the colshapes. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
iFoReX Posted July 26, 2012 Author Posted July 26, 2012 why the players can walk in my area ? elMota/elFoReX De Vuelta En MTA *---------* Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3 https://www.youtube.com/user/KillersGPs
Castillo Posted July 26, 2012 Posted July 26, 2012 Because you are checking if the hit element is a ped. if getElementType(hitElement) == "ped" then There. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
iFoReX Posted July 26, 2012 Author 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 ) ? elMota/elFoReX De Vuelta En MTA *---------* Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3 https://www.youtube.com/user/KillersGPs
scratcher911 Posted July 26, 2012 Posted July 26, 2012 if getElementType(hitElement) == "player" or not isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then
Al3grab Posted July 26, 2012 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 ) ING : [xXx]~Al3grab
iFoReX Posted July 27, 2012 Author Posted July 27, 2012 all can enter elMota/elFoReX De Vuelta En MTA *---------* Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3 https://www.youtube.com/user/KillersGPs
top sniper Posted July 27, 2012 Posted July 27, 2012 all can enter yes ,, zombieProof will stop spawning the zombie in the radar arena only ================================================================== ~|منٌ رأيّتُموِۂ يّعتُدُيّ على عرض فُتُٱة مؤمنٌة فُٱسًحًقَوِوِوِوِوِوِوِة|~ ==================================================================
iFoReX Posted July 27, 2012 Author Posted July 27, 2012 local accName = getAccountName(acc) if not isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then killPed(hitElement) are you kidding me ? elMota/elFoReX De Vuelta En MTA *---------* Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3 https://www.youtube.com/user/KillersGPs
Al3grab Posted July 27, 2012 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 ING : [xXx]~Al3grab
iFoReX Posted July 27, 2012 Author Posted July 27, 2012 all players can enter to the area elMota/elFoReX De Vuelta En MTA *---------* Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3 https://www.youtube.com/user/KillersGPs
Al3grab Posted July 27, 2012 Posted July 27, 2012 all players can enter to the area Any error @ /debugscript 3 ? ING : [xXx]~Al3grab
Kenix Posted July 27, 2012 Posted July 27, 2012 Check conditions via outputChatBox for example. http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
iFoReX Posted July 27, 2012 Author Posted July 27, 2012 it not have errors in debugscript 3 al3grab elMota/elFoReX De Vuelta En MTA *---------* Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3 https://www.youtube.com/user/KillersGPs
Al3grab Posted July 28, 2012 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 : ING : [xXx]~Al3grab
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