Jump to content

Como hacer esto


Recommended Posts

Posted

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) 

Posted

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

430x73_FFFFFF_FF9900_000000_000000.png
Posted

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%

Posted

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.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Si, pero estabas usando la rotacion X, no la rotacion Z que es lo que retorna getPedRotation.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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 
) 

Posted

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.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

No hay de que ;).

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
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

Posted

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

430x73_FFFFFF_FF9900_000000_000000.png
Posted

@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.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

1.- CP = crear ped

2.- Ya lo arregle todo gracias a su ayuda

3.- Si setElementFrozen le permite moverse con tranquilidad :D

PD : es para hacer una fiesta de skins en el club de jizzy ;)

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...