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

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 
) 
  

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 
) 

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.

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?

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 
) 

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

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