RekZ Posted June 26, 2012 Posted June 26, 2012 Zombies cant spawn and de zone have create in the map and radar, but the players no dead when they enter in the zone... i need this to create a private base for ACL. safecol = createColCuboid ( 3386.82764, -754.43237, 27.01133, 255, 255, 255 ) -- sintax: posX, posY, posZ, sizeX, sizeY,sizeZ (este genera un cuadro invisible q no deja que los zombien ni lo que no sean de los grupos acl enten) safeZoneRadar = createRadarArea ( 3386.82764, -754.43237, 280, 320, 66, 199, 255 ) -- sintax: posX, posY, sizeX, sizeY, colorR, colorG, colorB, colorAlfa (este forma un cuadro en el radar y en el mapa) setElementData (safeZoneRadar, "zombieProof", true) safecol = createColSphere( -2307.53149, 2224.94287, -0.55000, 255, 255, 255 ) function enterZone(hitPlayer,thePlayer) local accountname = getAccountName (getPlayerAccount(hitPlayer,thePlayer)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "USS" ) ) then toggleControl (hitPlayer, "fire", true ) toggleControl (hitPlayer, "aim_weapon", true) toggleControl (hitPlayer, "vehicle_fire", true) -- tiene lo derechos de acl al ENTRAR outputChatBox("Bienevnido a La Base [u.S.S].", hitPlayer, 0, 100, 255) else -- no tiene los derechos de acl al ENTRAR outputChatBox("Zona Restringida , Solo Personal Autorizado.", hitPlayer, 255, 0, 0) killPed (hitPlayer) end end addEventHandler( "onColShapeHit", safecol, enterZone ) function leaveZone(hitPlayer,thePlayer) local accountname = getAccountName (getPlayerAccount(hitPlayer,thePlayer)) toggleControl (hitPlayer, "fire", true) toggleControl (hitPlayer, "aim_weapon", true) toggleControl (hitPlayer, "vehicle_fire", true) -- tiene los derechos de acl al SALIR outputChatBox("Haz salido de la base.", hitPlayer, 255, 0, 0) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "USS" ) ) then -- no tiene los derechos de acl al SALIR outputChatBox("Acceso denegado.", hitPlayer, 255, 0, 0) killPed (hitPlayer) end end addEventHandler( "onColShapeLeave", safecol, leaveZone ) Admin and Owner of the Pro Chile Community :3
Castillo Posted June 26, 2012 Posted June 26, 2012 safecol = createColCuboid ( 3386.82764, -754.43237, 27.01133, 255, 255, 255 ) -- sintax: posX, posY, posZ, sizeX, sizeY,sizeZ (este genera un cuadro invisible q no deja que los zombien ni lo que no sean de los grupos acl enten) safeZoneRadar = createRadarArea ( 3386.82764, -754.43237, 280, 320, 66, 199, 255 ) -- sintax: posX, posY, sizeX, sizeY, colorR, colorG, colorB, colorAlfa (este forma un cuadro en el radar y en el mapa) setElementData (safeZoneRadar, "zombieProof", true) safecol = createColSphere( -2307.53149, 2224.94287, -0.55000, 255, 255, 255 ) function enterZone ( hitElement ) if ( getElementType ( hitElement ) == "player" ) then local accountname = getAccountName ( getPlayerAccount ( hitElement ) ) if isObjectInACLGroup ( "user.".. accountname, aclGetGroup ( "USS" ) ) then toggleControl ( hitElement, "fire", true ) toggleControl ( hitElement, "aim_weapon", true ) toggleControl ( hitElement, "vehicle_fire", true ) -- tiene lo derechos de acl al ENTRAR outputChatBox ( "Bienevnido a La Base [u.S.S].", hitElement, 0, 100, 255 ) else -- no tiene los derechos de acl al ENTRAR outputChatBox ( "Zona Restringida , Solo Personal Autorizado.", hitElement, 255, 0, 0 ) killPed ( hitElement ) end elseif ( getElementType ( hitElement ) == "ped" ) then killPed ( hitElement ) end end addEventHandler ( "onColShapeHit", safecol, enterZone ) function leaveZone ( leaveElement ) if ( getElementType ( leaveElement ) == "player" ) then local accountname = getAccountName ( getPlayerAccount ( leaveElement ) ) toggleControl ( leaveElement, "fire", true ) toggleControl ( leaveElement, "aim_weapon", true ) toggleControl ( leaveElement, "vehicle_fire", true ) -- tiene los derechos de acl al SALIR outputChatBox("Haz salido de la base.", leaveElement, 255, 0, 0) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "USS" ) ) then -- no tiene los derechos de acl al SALIR killPed ( leaveElement ) outputChatBox("Acceso denegado.", leaveElement, 255, 0, 0) end elseif ( getElementType ( leaveElement ) == "ped" ) then killPed ( leaveElement ) end end addEventHandler ( "onColShapeLeave", safecol, leaveZone ) Is that what you mean? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
RekZ Posted June 26, 2012 Author Posted June 26, 2012 No sorry .. when the player enter and he isnt in the ACL , must dead. but if the player is in the ACL mustn dead i´m not explain Admin and Owner of the Pro Chile Community :3
Castillo Posted June 26, 2012 Posted June 26, 2012 Well, that should work, if the element that hit the colshape is a "player" it'll do the check, if it's a "ped", it'll kill him. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
RekZ Posted June 26, 2012 Author Posted June 26, 2012 i test it and the player not die when he enter Admin and Owner of the Pro Chile Community :3
Castillo Posted June 26, 2012 Posted June 26, 2012 You are in a vehicle? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
RekZ Posted June 26, 2012 Author Posted June 26, 2012 no .. this is a problem ? Admin and Owner of the Pro Chile Community :3
GhostXoP Posted June 26, 2012 Posted June 26, 2012 If Player Not Part of Group U.S.S, Player Die on enter of Colshape. Correct?
Castillo Posted June 26, 2012 Posted June 26, 2012 --safecol = createColCuboid ( 3386.82764, -754.43237, 27.01133, 255, 255, 255 ) -- sintax: posX, posY, posZ, sizeX, sizeY,sizeZ (este genera un cuadro invisible q no deja que los zombien ni lo que no sean de los grupos acl enten) safeZoneRadar = createRadarArea ( 3386.82764, -754.43237, 280, 320, 66, 199, 255 ) -- sintax: posX, posY, sizeX, sizeY, colorR, colorG, colorB, colorAlfa (este forma un cuadro en el radar y en el mapa) setElementData ( safeZoneRadar, "zombieProof", true ) safecol = createColSphere ( -2307.53149, 2224.94287, -0.55000, 255, 255, 255 ) function enterZone ( hitElement ) if ( getElementType ( hitElement ) == "player" ) then local accountname = getAccountName ( getPlayerAccount ( hitElement ) ) if isObjectInACLGroup ( "user.".. accountname, aclGetGroup ( "USS" ) ) then toggleControl ( hitElement, "fire", true ) toggleControl ( hitElement, "aim_weapon", true ) toggleControl ( hitElement, "vehicle_fire", true ) -- tiene lo derechos de acl al ENTRAR outputChatBox ( "Bienevnido a La Base [u.S.S].", hitElement, 0, 100, 255 ) else -- no tiene los derechos de acl al ENTRAR outputChatBox ( "Zona Restringida , Solo Personal Autorizado.", hitElement, 255, 0, 0 ) killPed ( hitElement ) end elseif ( getElementType ( hitElement ) == "ped" ) then killPed ( hitElement ) end end addEventHandler ( "onColShapeHit", safecol, enterZone ) function leaveZone ( leaveElement ) if ( getElementType ( leaveElement ) == "player" ) then local accountname = getAccountName ( getPlayerAccount ( leaveElement ) ) toggleControl ( leaveElement, "fire", true ) toggleControl ( leaveElement, "aim_weapon", true ) toggleControl ( leaveElement, "vehicle_fire", true ) -- tiene los derechos de acl al SALIR outputChatBox("Haz salido de la base.", leaveElement, 255, 0, 0) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "USS" ) ) then -- no tiene los derechos de acl al SALIR killPed ( leaveElement ) outputChatBox("Acceso denegado.", leaveElement, 255, 0, 0) end elseif ( getElementType ( leaveElement ) == "ped" ) then killPed ( leaveElement ) end end addEventHandler ( "onColShapeLeave", safecol, leaveZone ) Your problem is that you have 2 colshapes, I've tested with the second one and it killed me. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
RekZ Posted June 26, 2012 Author Posted June 26, 2012 and why in my server dont killme y test it and dont kill any player. Admin and Owner of the Pro Chile Community :3
Castillo Posted June 26, 2012 Posted June 26, 2012 Zona Restringida , Solo Personal Autorizado.Haz salido de la base. That's what it said when I warped myself to the colshape. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
RekZ Posted June 26, 2012 Author Posted June 26, 2012 in my server dont have any reaccion and any mesenges when i enter , probably other scrip bugged it ? Admin and Owner of the Pro Chile Community :3
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