elmarcosmta14 Posted April 26, 2012 Posted April 26, 2012 Como hago para que este ped aparesca con la rotacion que yo tengo por ejemplo si yo estoy en 90 grados,cuando yo escriba ''cp'' el aparesca en 90 grados tambien, aqui esta el script: function crearPed() local ped1 = createPed(107,getElementPosition(me)) setPedAnimation(ped1, "ped", "WALK_gang1") giveWeapon(ped1, 31, 800) end addCommandHandler("cp", crearPed)
iFoReX Posted April 26, 2012 Posted April 26, 2012 seria mas ordenado asi addCommandHandler("cp", function () local x,y,z = getElementPosition( localPlayer ) local rot = getElementRotation ( localPlayer ) local ped1 = createPed(107, x, y, z, rot ) setPedAnimation(ped1, "ped", "WALK_gang1") giveWeapon(ped1, 31, 800) end ) en un rato lo pruebo en mi sver y te digo q tal EDIT : Ya lo probe funciona Perfectamente pruebalo en el tuyo y dime q tal elMota/elFoReX De Vuelta En MTA *---------* Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3 https://www.youtube.com/user/KillersGPs
elmarcosmta14 Posted April 26, 2012 Author Posted April 26, 2012 funciono,pero ahora no le da el arma : attempt to call global 'giveWeapon' (a nil value)
iFoReX Posted April 26, 2012 Posted April 26, 2012 aa si para el give weapon tienes q poner este resource en server-side en meta donde dice type="server" eso elMota/elFoReX De Vuelta En MTA *---------* Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3 https://www.youtube.com/user/KillersGPs
Edikosh998 Posted April 26, 2012 Posted April 26, 2012 Si avisale que si pone server side cambia los parametros, no hay localPlayer: addCommandHandler("cp", function (player) local x,y,z = getElementPosition( player) local rot = getElementRotation ( player) local ped1 = createPed(107, x, y, z, rot ) setPedAnimation(ped1, "ped", "WALK_gang1") giveWeapon(ped1, 31, 800) end ) WRS( World Racing Server) [server] = 8%
Castillo Posted April 26, 2012 Posted April 26, 2012 getElementRotation retorna 3 argumentos, mejor usa getPedRotation. addCommandHandler ( "cp", function ( player ) local x, y, z = getElementPosition ( player ) local rot = getPedRotation ( player ) local ped1 = createPed ( 107, x, y, z, rot ) setPedAnimation ( ped1, "ped", "WALK_gang1" ) setTimer ( giveWeapon, 1000, 1, ped1, 31, 800 ) end ) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
iFoReX Posted April 26, 2012 Posted April 26, 2012 Solid a mi lo de getElemenetRotation con 1 argumento me funcionaba elMota/elFoReX De Vuelta En MTA *---------* Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3 https://www.youtube.com/user/KillersGPs
Castillo Posted April 26, 2012 Posted April 26, 2012 Si, pero estabas usando la rotacion X, no la rotacion Z que es lo que retorna getPedRotation. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
elmarcosmta14 Posted April 27, 2012 Author Posted April 27, 2012 Se necesita agregar algo mas para que se vean adentro de casas, clubes, etc por ejemplo en el club de jizzy escribi mi comando pero no se veia el ped,solo veia su sombra
Castillo Posted April 27, 2012 Posted April 27, 2012 Es porque eso es un interior, necesitas usar setElementInterior. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
elmarcosmta14 Posted April 27, 2012 Author Posted April 27, 2012 seria algo asi o no? addCommandHandler ( "cp", function ( player ) local x, y, z = getElementPosition ( player ) local rot = getPedRotation ( player ) local ped1 = createPed ( 152, x, y, z, rot ) setPedAnimation ( ped1, "STRIP", "strip_D" ) setElementInterior(ped1, x, y, z, rot ) setElementFrozen(ped1, true) end )
Castillo Posted April 27, 2012 Posted April 27, 2012 Que tiene quever la posicion y la rotacion con el interior? el interior tiene que ser un numero entero. En el admin panel podes ver en que interior estas. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
elmarcosmta14 Posted April 27, 2012 Author Posted April 27, 2012 A ya gracias Solid como siempre el mejor
Castillo Posted April 27, 2012 Posted April 27, 2012 No hay de que . San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Alexs Posted April 27, 2012 Posted April 27, 2012 seria algo asi o no? addCommandHandler ( "cp", function ( player ) local x, y, z = getElementPosition ( player ) local rot = getPedRotation ( player ) local ped1 = createPed ( 152, x, y, z, rot ) setPedAnimation ( ped1, "STRIP", "strip_D" ) setElementInterior(ped1, x, y, z, rot ) setElementFrozen(ped1, true) end ) 2 Cosas: -CP es Crear Puta? -Usa getElementInterior local intr = getElementInterior(player) setElementInterior(ped1, intr ) y tengo una duda "setElementFrozen" le permite moverse con tranquilidad en la animacion? Developer @ MYVAL
iFoReX Posted April 27, 2012 Posted April 27, 2012 creo q seria asi addCommandHandler ( "cp", function ( player ) local x, y, z = getElementPosition ( player ) local rot = getPedRotation ( player ) local ped1 = createPed ( 152, x, y, z, rot ) setPedAnimation ( ped1, "STRIP", "strip_D" ) setElementInterior(ped1, AquiElInterior ) --No necesitas poner las coordenadas creo setElementFrozen(ped1, true) end ) elMota/elFoReX De Vuelta En MTA *---------* Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3 https://www.youtube.com/user/KillersGPs
Castillo Posted April 27, 2012 Posted April 27, 2012 @marcos: Mejor usa lo de Alexs_Steel, asi obtiene el interior del jugador y lo usa para el PED. @Alexs_Steel: CP = Crear Ped ( O create ped ). San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
elmarcosmta14 Posted April 27, 2012 Author Posted April 27, 2012 1.- CP = crear ped 2.- Ya lo arregle todo gracias a su ayuda 3.- Si setElementFrozen le permite moverse con tranquilidad PD : es para hacer una fiesta de skins en el club de jizzy
Recommended Posts