Jump to content

Ayuda con puertas automaticas


depato123

Recommended Posts

Buenas. Tengo un problema con este script

a51gate1 = createObject ( 3037, 1251, -796.79998779297, 1085.1999511719, 0, 0, 0 ) 
setElementInterior ( a51gate1, 5 ) 
a51col = createColCircle ( 1251, -796.79998779297, 1085.1999511719, 4 ) 
setElementInterior ( a51gate1, 5 ) 
  
function opena51gates(thePlayer) 
    local getPlayerTeam ( thePlayer ) == teamcnn then        
       moveObject (a51gate1, 5000, 1250.5999755859, -793.59997558594, 1085.1999511719 ) 
end 
end 
addEventHandler( "onColShapeHit", a51col, opena51gates ) 
  
function closea51gates(thePlayer) 
if getElementModel( thePlayer ) == 287 then 
       moveObject (a51gate1, 5000, 1251, -796.79998779297, 1085.1999511719 ) 
end 
end 
addEventHandler( "onColShapeLeave", a51col, closea51gates ) 

Como ven creo un objeto. ese objeto es una puerta y esta en el interior 5 y el primer problema es que no se crea la puerta o no esta en el interior 5 . el segundo problema es este

Bn6hDtg.png

Dice que esta mal escrito.

¿Que es lo que esta mal en este script?

Edito* PD: las puertas se tendrian que abrir a cualquier usuario que sea del team CNN Radio y no se si poner Team cnn o teamcnn. tengo asi el otro script donde se crea el cnn team

cnnteam = createTeam ( "CNN Radio", 255, 255, 0 ) 

y no se si poner cnnteam o cnn Radio

Link to comment

Gracias. Con eso se soluiciona un problema. Este es el otro

Consola

[2013-10-15 16:27:35] Starting a51gates

[2013-10-15 16:27:35] SCRIPT ERROR: a51gates\area51.lua:7: 'then' expected near 'de'

[2013-10-15 16:27:35] ERROR: Loading script failed: a51gates\area51.lua:7: 'then' expected near 'de'

[2013-10-15 16:27:35] a51gates restarted successfully

Link to comment

ok

a51gate1 = createObject ( 3037, 1251, -796.79998779297, 1085.1999511719, 0, 0, 0 ) 
setElementInterior ( a51gate1, 5 ) 
a51col = createColCircle ( 1251, -796.79998779297, 1085.1999511719, 4 ) 
setElementInterior ( a51gate1, 5 ) 
  
function opena51gates(thePlayer) 
    if getPlayerTeam ( thePlayer ) == Reporteros de CNN then   
       moveObject (a51gate1, 5000, 1250.5999755859, -793.59997558594, 1085.1999511719 ) 
end 
end 
addEventHandler( "onColShapeHit", a51col, opena51gates ) 
  
function closea51gates(thePlayer) 
if getElementModel( thePlayer ) == 287 then 
       moveObject (a51gate1, 5000, 1251, -796.79998779297, 1085.1999511719 ) 
end 
end 
addEventHandler( "onColShapeLeave", a51col, closea51gates ) 

Link to comment
  • 2 weeks later...
  • Recently Browsing   0 members

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