Brad96 Posted August 22, 2013 Share Posted August 22, 2013 function car( thePlayer ) local x, y, z = getElementPosition ( thePlayer ) vehiculo = createVehicle ( 411, x + 5, y, z ) objeto = createObject (359, x, y, z, 0 ,0 ,90) attachElements ( vehiculo , objeto , -1 ,2 ,00.1 ) end addEventHandler ( "onResourceStart", getRootElement(), car ) esta bien ese script ? crea el auto pero no puedo entrar en el yo opino que es el onResourceStart es para resource y no para el jugador osea , como estoy incluyendo al PLAYER .. no me servira xq estoy usando onClientResourceStart .. estoy bien ? y con que evento podria funcionar ? gracias Link to comment
Arsilex Posted August 22, 2013 Share Posted August 22, 2013 function car( thePlayer ) local x, y, z = getElementPosition ( thePlayer ) vehiculo = createVehicle ( 411, x + 5, y, z ) objeto = createObject (359, x, y, z, 0 ,0 ,90) attachElements ( objeto, vehiculo, -1 ,2 ,00.1 ) end addEventHandler ( "onResourceStart", getRootElement(), car ) Link to comment
BorderLine Posted August 23, 2013 Share Posted August 23, 2013 man eso no funcionara, el primer argumento de onResourceStart es el resource y no el jugador, como lo estas definiendo, imposible sacar las cordenadas del resource al cual definiste thePlayer lea la wiki https://wiki.multitheftauto.com/wiki/OnResourceStart Link to comment
Alexs Posted August 23, 2013 Share Posted August 23, 2013 Usa un for-loop de todos lo elementos de tipo 'player' y vas filtrando con estamentos (if-then) a los que quieras que tengan el vehículo. Link to comment
Brad96 Posted August 24, 2013 Author Share Posted August 24, 2013 yaku eso ya lo se , es para un man que le estoy diciendo que onResourceStart no servira cn el jugador como me explicaste , y alex todavia no se usar esa clase de funciones .. Link to comment
Alexs Posted August 24, 2013 Share Posted August 24, 2013 yaku eso ya lo se , es para un man que le estoy diciendo que onResourceStart no servira cn el jugador como me explicaste , y alex todavia no se usar esa clase de funciones .. Te dejo un tutorial: http://lua-users.org/wiki/ControlStructureTutorial Link to comment
Brad96 Posted August 24, 2013 Author Share Posted August 24, 2013 Gracias ! alex .. lo leeres unas 19 veces para entender Link to comment
Recommended Posts