Jump to content

puertas automaticas


LANS

Recommended Posts

hola, estoy haciendo un server de zombies y tengo con las puertas que se abren ante la presencia de un jugador pero mi problema es que tambien se abren ante los zombies

este es el script

checkGateMarker = createMarker ( 2463.6999511719, 1963.3000488281, 10.800000190735, "corona", 9.0, 0, 0, 255, 0 ) 
  
function createGate () 
    gatePolice1 = createObject ( 971, 2463.7998046875, 1963.19921875, 13.5, 0, 0, 179.99450683594) 
     
end 
addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createGate ) 
  
  
function gateCheckingTeam ( thePlayer, matchingDimension ) 
    moveObject ( gatePolice1, 1000, 2455, 1963.1999511719, 13.5 ) 
     
end 
addEventHandler ( "onMarkerHit", checkGateMarker, gateCheckingTeam ) 
  
  
  
function movingBackPolice ( thePlayer, matchingDimension ) 
    moveObject ( gatePolice1, 1000, 2463.7998046875, 1963.19921875, 13.5 ) 
     
end 
addEventHandler ( "onMarkerLeave", checkGateMarker, movingBackPolice ) 

¿que debo agregar para solucionar este problema?

Link to comment

no me ha funcionado lo que hice pero no se si esta bien

checkGateMarker = createMarker ( 2463.6999511719, 1963.3000488281, 10.800000190735, "corona", 9.0, 0, 0, 255, 0 ) 
  
function createGate () 
    gatePolice1 = createObject ( 971, 2463.7998046875, 1963.19921875, 13.5, 0, 0, 179.99450683594) 
     
end 
addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createGate ) 
  
  
function gateCheckingTeam ( thePlayer, matchingDimension ) 
  if getElementType (hitPlayer) =="player" then 
    moveObject ( gatePolice1, 1000, 2455, 1963.1999511719, 13.5 ) 
     
end 
end 
addEventHandler ( "onMarkerHit", checkGateMarker, gateCheckingTeam ) 
  
  
  
function movingBackPolice ( thePlayer, matchingDimension ) 
    moveObject ( gatePolice1, 1000, 2463.7998046875, 1963.19921875, 13.5 ) 
     
end 
addEventHandler ( "onMarkerLeave", checkGateMarker, movingBackPolice ) 

Link to comment
checkGateMarker = createMarker ( 2463.6999511719, 1963.3000488281, 10.800000190735, "corona", 9.0, 0, 0, 255, 0 ) 
  
function createGate () 
    gatePolice1 = createObject ( 971, 2463.7998046875, 1963.19921875, 13.5, 0, 0, 179.99450683594) 
  
end 
addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createGate ) 
  
  
function gateCheckingTeam ( hitPlayer, matchingDimension ) 
  if getElementType (hitPlayer) =="player" then 
    moveObject ( gatePolice1, 1000, 2455, 1963.1999511719, 13.5 ) 
  
end 
end 
addEventHandler ( "onMarkerHit", checkGateMarker, gateCheckingTeam ) 
  
  
  
function movingBackPolice ( thePlayer, matchingDimension ) 
    moveObject ( gatePolice1, 1000, 2463.7998046875, 1963.19921875, 13.5 ) 
  
end 
addEventHandler ( "onMarkerLeave", checkGateMarker, movingBackPolice ) 

Link to comment

Proba haci

checkGateMarker = createMarker ( 2463.6999511719, 1963.3000488281, 10.800000190735, "corona", 9.0, 0, 0, 255, 0 ) 
  
function createGate () 
    gatePolice1 = createObject ( 971, 2463.7998046875, 1963.19921875, 13.5, 0, 0, 179.99450683594) 
  
end 
addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createGate ) 
  
  
function gateCheckingTeam ( hitPlayer, matchingDimension ) 
  if getElementType (hitPlayer) =="player" then 
    moveObject ( gatePolice1, 1000, 2455, 1963.1999511719, 13.5 ) 
  
end 
end 
addEventHandler ( "onMarkerHit", getRootElement(), gateCheckingTeam ) 
  
  
  
function movingBackPolice ( thePlayer, matchingDimension ) 
    moveObject ( gatePolice1, 1000, 2463.7998046875, 1963.19921875, 13.5 ) 
  
end 
addEventHandler ( "onMarkerLeave", getRootElement(), movingBackPolice ) 

PD: checkGateMarker NO EXISTE

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...