depato123 Posted October 15, 2013 Posted October 15, 2013 Buenas. Tengo un problema con este script https://community.multitheftauto.com/index.php?p=resources&s=details&id=812 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 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
Castillo Posted October 15, 2013 Posted October 15, 2013 local getPlayerTeam ( thePlayer ) == teamcnn then Cambia 'local' por 'if'.
depato123 Posted October 15, 2013 Author Posted October 15, 2013 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
depato123 Posted October 15, 2013 Author Posted October 15, 2013 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 )
Castillo Posted October 15, 2013 Posted October 15, 2013 if getPlayerTeam ( thePlayer ) == Reporteros de CNN then Esta mal. Pone: if ( getPlayerTeam ( thePlayer ) and getTeamName ( getPlayerTeam ( thePlayer ) ) == "Reporteros de CNN" ) then
Recommended Posts