depato123 Posted May 29, 2013 Posted May 29, 2013 Hola amigos, intente crear un ped, darle una animación y un skin pero no crea el ped el resource tengo esto function makePed() ped1 = createPed(211, -2494.5, 2511.89, 18.5) setPedRotation(ped1, 270) setPedAnimation( ped1, "FOOD", "FF_Sit_Loop") end
Castillo Posted May 29, 2013 Posted May 29, 2013 Y como ejecutas esa funcion? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Castillo Posted May 29, 2013 Posted May 29, 2013 Creaste una funcion y nunca la ejecutas, nunca va a crearse el ped. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
depato123 Posted May 29, 2013 Author Posted May 29, 2013 function makePed() ped1 = createPed ( 211, -2494.5, 2511.89, 18.5 ) setPedRotation(ped1, 270) setPedAnimation(ped1, "INT_OFFICE", "OFF_Sit_Idle_Loop") end addEventHandler ( "onResourceStart", getResourceRootElement(), makePed ) Ya lo arregle pero no ejecuta la acción de sentarse ayudaaa
Sasu Posted May 29, 2013 Posted May 29, 2013 function makePed() ped1 = createPed ( 211, -2494.5, 2511.89, 18.5 ) setPedRotation(ped1, 270) setPedAnimation(ped1, "INT_OFFICE", "OFF_Sit_Idle_Loop") end addEventHandler ( "onResourceStart", resourceRoot, makePed ) --[[ Te falto el argumento en getResourceRootElement. Mejor usa: resourceRoot = variable del mta = getResourceRootElement(getThisResource()) ]] State: Inactive
depato123 Posted May 29, 2013 Author Posted May 29, 2013 function makePed() ped1 = createPed ( 211, -2494.5, 2511.89, 18.5 ) setPedRotation(ped1, 270) setPedAnimation(ped1, "INT_OFFICE", "OFF_Sit_Idle_Loop") end addEventHandler ( "onResourceStart", resourceRoot, makePed ) --[[ Te falto el argumento en getResourceRootElement. Mejor usa: resourceRoot = variable del mta = getResourceRootElement(getThisResource()) ]] Gracias. ¿Y como hago para que el ped haga la acción de sentarse?
FraN-724 Posted May 29, 2013 Posted May 29, 2013 tendrias que buscar la animacion de sentarse, no crees?
depato123 Posted May 29, 2013 Author Posted May 29, 2013 tendrias que buscar la animacion de sentarse, no crees? setPedAnimation(ped1, "INT_OFFICE", "OFF_Sit_Idle_Loop") esa es la animación de sentarse
NodZen Posted May 29, 2013 Posted May 29, 2013 Cual es el problema ahora: ¿No se crea el ped o no se sienta?. ------------------------------------------------------------------------------------------ My scripts http://community.multitheftauto.com/index.php?p=resources&s=details&id=6977 http://community.multitheftauto.com/index.php?p=resources&s=details&id=7740
depato123 Posted May 29, 2013 Author Posted May 29, 2013 Cual es el problema ahora: ¿No se crea el ped o no se sienta?. no se sienta
NodZen Posted May 29, 2013 Posted May 29, 2013 Agregále los demás argumentos... Talvéz sea eso. ------------------------------------------------------------------------------------------ My scripts http://community.multitheftauto.com/index.php?p=resources&s=details&id=6977 http://community.multitheftauto.com/index.php?p=resources&s=details&id=7740
depato123 Posted May 29, 2013 Author Posted May 29, 2013 Agregále los demás argumentos... Talvéz sea eso. Perdón por la pregunta, pero...¿cuales?
Alexs Posted May 30, 2013 Posted May 30, 2013 addEventHandler ( "onResourceStart", resourceRoot, function() ped1 = createPed ( 211, -2494.5, 2511.89, 18.5 ) setPedRotation(ped1, 270) setPedAnimation(ped1, "INT_OFFICE", "OFF_Sit_Idle_Loop", -1, false, true, false, true) end ) Developer @ MYVAL
Sensacion Posted May 30, 2013 Posted May 30, 2013 Prueba esto: addEventHandler ( "onResourceStart", resourceRoot, function() local ped1 = createPed ( 211, -2494.5, 2511.89, 18.5 ) setTimer( setPedRotation, 150, 1, ped1, 270 ) setTimer( setPedAnimation, 150, 1, ped1, "INT_OFFICE", "OFF_Sit_Idle_Loop", -1, false, true, false, true ) end )
Recommended Posts