Edikosh998 Posted May 16, 2012 Share Posted May 16, 2012 ElMota me dijo que era tuyo y alex hize lo que dijistes y no funcionamira alex haci esta como me dijistes y no funciona "editor_main"> "pickup (Sniper) (1)" type="34" interior="0" amount="100" respawn="10" dimension="0" ammo="100" name="Sniper" posX="160.623734" posY="1933.336182" posZ="34.398438"> "object (drydock1_SFSe) (1)" doublesided="false" model="10828" interior="0" dimension="0" name="roof" posX="280.996704" posY="1876.698120" posZ="14.849337" rotX="90.2407954" rotY="-2.57831008" rotZ="1.71887339"> "autos1" paintjob="3" model="433" plate="QHP0 Z35" interior="0" dimension="0" posX="-2270" posY="2300.8999023438" posZ="5.4000000953674" rotX="0" rotY="0" rotZ="270"> "autos2" paintjob="3" model="433" plate="ABHU ONI" interior="0" dimension="0" posX="-2270.1000976563" posY="2304.8999023438" posZ="5.4000000953674" rotX="0" rotY="0" rotZ="270"> "autos3" paintjob="3" model="433" plate="GL28 EBV" interior="0" dimension="0" posX="-2270.3999023438" posY="2309.3999023438" posZ="5.4000000953674" rotX="0" rotY="0" rotZ="270"> "autos4" paintjob="3" model="427" plate="2ZC8 H5O" interior="0" dimension="0" posX="-2271" posY="2285.6000976563" posZ="5.0999999046326" rotX="0" rotY="0" rotZ="274"> "autos5" paintjob="3" model="427" plate="B4GI OZQ" interior="0" dimension="0" posX="-2271.1999511719" posY="2288.6999511719" posZ="5.0999999046326" rotX="0" rotY="0" rotZ="273.9990234375"> "autos6" paintjob="3" model="427" plate="Q83D Z9F" interior="0" dimension="0" posX="-2271.1000976563" posY="2291.8000488281" posZ="5.0999999046326" rotX="0" rotY="0" rotZ="273.9990234375"> "autos7" paintjob="3" model="468" plate="24AG 9OM" interior="0" dimension="0" posX="-2272.3000488281" posY="2294.6000976563" posZ="4.5999999046326" rotX="0" rotY="0" rotZ="274"> "autos8" paintjob="3" model="468" plate="6XP9 787" interior="0" dimension="0" posX="-2272.1000976563" posY="2297.8000488281" posZ="4.5999999046326" rotX="0" rotY="0" rotZ="276"> "autos9" paintjob="3" model="497" plate="PQ21 SDM" interior="0" dimension="0" posX="-2227.3000488281" posY="2326.8999023438" posZ="7.8000001907349" rotX="0" rotY="0" rotZ="0"> "autos10" paintjob="3" model="497" plate="NE2Y 36B" interior="0" dimension="0" posX="-2227.5" posY="2304.3000488281" posZ="5.5999999046326" rotX="0" rotY="0" rotZ="0"> "autos11" paintjob="3" model="548" plate="STFL 2S5" interior="0" dimension="0" posX="-2294.6999511719" posY="2418.8000488281" posZ="6.5" rotX="0" rotY="0" rotZ="44"> "autos12" paintjob="3" model="548" plate="OPU2 VSL" interior="0" dimension="0" posX="-2277" posY="2399.8999023438" posZ="6.5" rotX="0" rotY="0" rotZ="43.994750976563"> "autos13" paintjob="3" model="597" plate="2LVL Q0E" interior="0" dimension="0" posX="-2271.8000488281" posY="2313.1000976563" posZ="4.6999998092651" rotX="0" rotY="0" rotZ="270"> "autos14" paintjob="3" model="597" plate="H5L5 MSR" interior="0" dimension="0" posX="-2271.6999511719" posY="2316.3999023438" posZ="4.6999998092651" rotX="0" rotY="0" rotZ="270"> "autos15" paintjob="3" model="425" plate="GBS3 4EI" interior="0" dimension="0" posX="-2294" posY="2240.1000976563" posZ="5.6999998092651" rotX="0" rotY="0" rotZ="0"> addEventHandler ( "onResourceStart", resourceRoot, function ( ) vehicles = { } for index = 1, 15 do vehicles [ getElementByID ( "autos".. index ) ] = true end end ) addEventHandler ( "onVehicleStartEnter", root, function ( thePlayer, seat ) if ( seat ~= 0 ) then return end if ( vehicles [ source ] ) then if ( getPlayerTeam ( thePlayer ) and getTeamName ( getPlayerTeam ( thePlayer ) ) ~= "SAS" ) then outputChatBox ( "Este vehiculo esta restringido a los miembros de SAS", thePlayer, 255, 0, 0 ) cancelEvent ( ) end end end ) Me parece pero creo que el error es muy boludo ( a primera vista) : addEventHandler ( "onResourceStart", resourceRoot, function ( ) vehicles = { } for index = 1, 15 do vehicles [ getElementByID ( "autos"..tostring( index )) ] = true -- El ID tiene que ser string, y el index es number end end ) Link to comment
Alexs Posted May 16, 2012 Share Posted May 16, 2012 JAJAJAJA, @ElMota le paso el que habiamos intentado y no habiamos puesto el tostring xDD, Ok, entonces todo Ok Link to comment
Plate Posted May 16, 2012 Author Share Posted May 16, 2012 Me lo podes pasar haci como lo tenes por que ami no me anda porfa Link to comment
Alexs Posted May 16, 2012 Share Posted May 16, 2012 addEventHandler ( "onResourceStart", resourceRoot, function ( ) vehicles = { } for index = 1, 15 do vehicles [ getElementByID ( "autos"..tostring( index )) ] = true end end ) addEventHandler ( "onVehicleStartEnter", root, function ( thePlayer, seat ) if ( seat ~= 0 ) then return end if ( vehicles [ source ] ) then if ( getPlayerTeam ( thePlayer ) and getTeamName ( getPlayerTeam ( thePlayer ) ) ~= "SAS" ) then outputChatBox ( "Este vehiculo esta restringido a los miembros de SAS", thePlayer, 255, 0, 0 ) cancelEvent ( ) end end end ) eso en el server side y el .map en otro archivo Link to comment
Plate Posted May 16, 2012 Author Share Posted May 16, 2012 sigue sin andar nose por que no anda u.u Link to comment
Alexs Posted May 17, 2012 Share Posted May 17, 2012 Pues revisa todo bien, quiza hiciste algo mal Link to comment
Plate Posted May 17, 2012 Author Share Posted May 17, 2012 puse en la carpeta del mapa un archivo lock.lua y hay puse el code addEventHandler ( "onResourceStart", resourceRoot, function ( ) vehicles = { } for index = 1, 15 do vehicles [ getElementByID ( "autos"..tostring( index )) ] = true end end ) addEventHandler ( "onVehicleStartEnter", root, function ( thePlayer, seat ) if ( seat ~= 0 ) then return end if ( vehicles [ source ] ) then if ( getPlayerTeam ( thePlayer ) and getTeamName ( getPlayerTeam ( thePlayer ) ) ~= "SAS" ) then outputChatBox ( "Este vehiculo esta restringido a los miembros de SAS", thePlayer, 255, 0, 0 ) cancelEvent ( ) end end end ) "editor_main"> "autos1" paintjob="3" model="433" plate="QHP0 Z35" interior="0" dimension="0" posX="-2270" posY="2300.8999023438" posZ="5.4000000953674" rotX="0" rotY="0" rotZ="270"> "autos2" paintjob="3" model="433" plate="ABHU ONI" interior="0" dimension="0" posX="-2270.1000976563" posY="2304.8999023438" posZ="5.4000000953674" rotX="0" rotY="0" rotZ="270"> "autos3" paintjob="3" model="433" plate="GL28 EBV" interior="0" dimension="0" posX="-2270.3999023438" posY="2309.3999023438" posZ="5.4000000953674" rotX="0" rotY="0" rotZ="270"> "autos4" paintjob="3" model="427" plate="2ZC8 H5O" interior="0" dimension="0" posX="-2271" posY="2285.6000976563" posZ="5.0999999046326" rotX="0" rotY="0" rotZ="274"> "autos5" paintjob="3" model="427" plate="B4GI OZQ" interior="0" dimension="0" posX="-2271.1999511719" posY="2288.6999511719" posZ="5.0999999046326" rotX="0" rotY="0" rotZ="273.9990234375"> "autos6" paintjob="3" model="427" plate="Q83D Z9F" interior="0" dimension="0" posX="-2271.1000976563" posY="2291.8000488281" posZ="5.0999999046326" rotX="0" rotY="0" rotZ="273.9990234375"> "autos7" paintjob="3" model="468" plate="24AG 9OM" interior="0" dimension="0" posX="-2272.3000488281" posY="2294.6000976563" posZ="4.5999999046326" rotX="0" rotY="0" rotZ="274"> "autos8" paintjob="3" model="468" plate="6XP9 787" interior="0" dimension="0" posX="-2272.1000976563" posY="2297.8000488281" posZ="4.5999999046326" rotX="0" rotY="0" rotZ="276"> "autos9" paintjob="3" model="497" plate="PQ21 SDM" interior="0" dimension="0" posX="-2227.3000488281" posY="2326.8999023438" posZ="7.8000001907349" rotX="0" rotY="0" rotZ="0"> "autos10" paintjob="3" model="497" plate="NE2Y 36B" interior="0" dimension="0" posX="-2227.5" posY="2304.3000488281" posZ="5.5999999046326" rotX="0" rotY="0" rotZ="0"> "autos11" paintjob="3" model="548" plate="STFL 2S5" interior="0" dimension="0" posX="-2294.6999511719" posY="2418.8000488281" posZ="6.5" rotX="0" rotY="0" rotZ="44"> "autos12" paintjob="3" model="548" plate="OPU2 VSL" interior="0" dimension="0" posX="-2277" posY="2399.8999023438" posZ="6.5" rotX="0" rotY="0" rotZ="43.994750976563"> "autos13" paintjob="3" model="597" plate="2LVL Q0E" interior="0" dimension="0" posX="-2271.8000488281" posY="2313.1000976563" posZ="4.6999998092651" rotX="0" rotY="0" rotZ="270"> "autos14" paintjob="3" model="597" plate="H5L5 MSR" interior="0" dimension="0" posX="-2271.6999511719" posY="2316.3999023438" posZ="4.6999998092651" rotX="0" rotY="0" rotZ="270"> "autos15" paintjob="3" model="425" plate="GBS3 4EI" interior="0" dimension="0" posX="-2294" posY="2240.1000976563" posZ="5.6999998092651" rotX="0" rotY="0" rotZ="0"> Link to comment
Alexs Posted May 18, 2012 Share Posted May 18, 2012 Quiza esta mal otra cosa, chequealo bien todo, a mi me va de 10 asi como lo tenes Link to comment
Plate Posted May 18, 2012 Author Share Posted May 18, 2012 jeje no puede entrar nadie ni los del team Link to comment
Recommended Posts