Jump to content

Problema con PedControl


Alexs

Recommended Posts

Hola a Todos, tengo este script:

Client

function modelarpingu ( ) 
txd = engineLoadTXD ( "pingu.txd" ) 
engineImportTXD ( txd, 295 ) 
dff = engineLoadDFF ( "pingu.dff", 295 ) 
engineReplaceModel ( dff, 295 ) 
end 
addEventHandler ( "onResourceStart", getRootElement(), modelarpingu ) 
  
function pingumove ( ) 
local pingu = getElementByID("pingu") 
setPedControlState ( pingu, "forwards", true ) 
local alexs = getPlayerFromName( "Alexs_Steel" ) 
local rox,roy,roz = getElementRotation(alexs) 
setElementRotation(pingu, rox,roy,roz) 
end 
addEventHandler ( "onClientRender", root, pingumove ) 

Server

function crearpingu ( ) 
local px,py,pz = getElementPosition(getPlayerFromName("Alexs_Steel")) 
local pingu = createPed(295, px,py - 10,pz) 
setElementID( pingu, "pingu" ) 
end 
addEventHandler ( "onResourceStart", getRootElement(), crearpingu ) 

El problema es que el ped no se reemplaza y la rotacion anda mal, hice este video para mostrarlo:

Link to comment
  • Recently Browsing   0 members

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