Jump to content

problem con ReplaceModel


iFoReX

Recommended Posts

Posted

xDD ayudenme con esto no me sale el auto

function remx() 
txd = engineLoadTXD( "bravura.txd" ) 
engineImportTXD( txd, 401 ) 
dff = engineLoadDFF( "bravura.dff", 401 ) 
engineImportDFF( dff, 401 ) 
end 
addEventHandler ( "onResourceStart", getRootElement(), remx ) 

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 (edited)
xDD ayudenme con esto no me sale el auto
function remx() 
txd = engineLoadTXD( "bravura.txd" ) 
engineImportTXD( txd, 401 ) 
dff = engineLoadDFF( "bravura.dff", 401 ) 
engineImportDFF( dff, 401 ) 
end 
addEventHandler ( "onResourceStart", getRootElement(), remx ) 

es asi:

  
function remx() 
avatar = engineLoadTXD ( "bravura.txd" ) 
engineImportTXD ( avatar, 401 ) 
dff = engineLoadDFF ( "bravura.dff", 0 ) 
engineReplaceModel ( dff, 401 ) --No se que mierda es engineImportDFF debes usar engineReplaceModel 
  
end 
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), remx)  

Edited by Guest

Developer @ MYVAL

Posted

Primero no se pone "engineImportDFF" sino que se pone

engineReplaceModel (dff,401) 

Y segundo, esto debe estar en cliente

addEventHandler ( "onClientResourceStart", getRootElement(), remx )  

WRS( World Racing Server) [server] = 8%

Posted

Para que cerrarlo? otro puede que tenga el mismo problema.

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 castillo :D

ahora, me ayudarian con esto ? me sale buggeado

  
function rem() 
  
txd = engineLoadTXD( "dft30.txd" ) 
engineImportTXD ( txd, 515 ) 
dff = engineLoadDFF( "dft30.dff", 0 ) 
engineReplaceModel ( dff, 515 ) 
end 
addEventHandler ( "onClientResourceStart", getRootElement(), rem ) 
  

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

Que queres decir con "buggeado"?

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

es q ise esto para ver q tal :D pero me salen buggeados mitad bajo tierra y mitad bien xD

  
function aparecer( source ) 
  
local x,y,z = getElementPosition( source ) 
createVehicle(515, x + 5, y, z) 
end 
addCommandHandler("car", aparecer) 
  
function aparecer2( source ) 
  
local x,y,z = getElementPosition( source ) 
createVehicle(401, x + 5, y, z) 
end 
addCommandHandler("car2", aparecer2) 
  

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

Talvez el modelo este mal hecho? podes intentar ponerle + 2 en el valor "z".

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
Talvez el modelo este mal hecho? podes intentar ponerle + 2 en el valor "z".

Es bastante probable, cuando scripteaba los Cleo Mods me pasaba lo mismo, muchos vehiculos de internet estan hechos mas abajo o mas arriba de los normales y se buggean en el script....

Developer @ MYVAL

Posted

me dirian q anda mal en esto no se mueve el gate

   gate = createObject ( 2951, 3109.0913085938, -842.58416748047, 28.436388015747, 0, 0, 43.170013427734) 
  
marker = createMarker ( 3100.59448, -833.24823, 29.19611, "cylinder", 2.0, 255, 255, 255, 170) 
  
function markerhit (hitPlayer) 
    if ( hitPlayer == localPlayer ) then 
  moveObject ( gate, 2200, 3109.0908203125, -842.63531494141, 24.53639793396) 
    end 
end 
addEventHandler ("onMarkerHit", marker, markerhit) 
  
function markerLeave( leaveElement, matchingDimension ) 
        if getElementType( leaveElement ) == "player" then 
  moveObject ( gate, 6000, 3109.0913085938, -842.58416748047, 28.436388015747) 
        end 
end 
  
addEventHandler( "onMarkerLeave", marker, markerLeave ) 
  
s2 = createBlip( 2920.76171875, -794.72790527344, 11.571973800659,23) 

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
gate = createObject ( 2951, 3109.0913085938, -842.58416748047, 28.436388015747, 0, 0, 43.170013427734) 
  
marker = createMarker ( 3100.59448, -833.24823, 29.19611, "cylinder", 2.0, 255, 255, 255, 170) 
s2 = createBlip( 2920.76171875, -794.72790527344, 11.571973800659,23) 
  
function markerhit (hitPlayer) 
     moveObject ( gate, 2200, 3109.0908203125, -842.63531494141, 24.53639793396) 
end 
addEventHandler ("onMarkerHit", marker, markerhit) 
  
function markerLeave( leaveElement, matchingDimension ) 
        if getElementType( leaveElement ) == "player" then 
  moveObject ( gate, 6000, 3109.0913085938, -842.58416748047, 28.436388015747) 
        end 
end 
  
addEventHandler( "onMarkerLeave", marker, markerLeave ) 

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

ayudenme con esto porfas xD es q creo q algo anda mal no me sale nada en el debugging ni en la console

autos = getElementsByType( "vehicle" ) 
x,y,z = getElementPosition( "autos" ) 
  
-----CreadoPorElMota------- 
  
function remx() 
avatar = engineLoadTXD ( "bravura.txd" ) 
engineImportTXD ( avatar, 401 ) 
dff = engineLoadDFF ( "bravura.dff", 0 ) 
engineReplaceModel ( dff, 401 )  
end 
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), remx) 
  
function () 
if "autos" then 
    local sound = playSound3D("musica.mp3", x, y, z, true) 
    end 
end  
bindKey("i","down", ) 
  

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

Ese script no tiene sentido, volve y pensa en que queres hacer y re-hacelo.

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

mmm man no entiendo mucho de esto pero me dirias q esta mal ?¡

  
-----CreadoPorElMota------- 
  
function remx() 
avatar = engineLoadTXD ( "bravura.txd" ) 
engineImportTXD ( avatar, 401 ) 
dff = engineLoadDFF ( "bravura.dff", 0 ) 
engineReplaceModel ( dff, 401 )  
end 
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), remx) 
  
function () 
if "getElementsByType( "vehicle" )" then 
    local sound = playSound("musica.mp3") 
    end 
end  
bindKey("i","down", ) 
  

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

La funcion: "xd" no tiene sentido. Lo que vos queres es verificar si el jugador esta en un vehiculo?

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

man cuando estoy en tierra no se para la cancion D:

function () 
if isPedInVehicle then 
    local sound = playSound("musica.mp3") 
elseif isPedOnGround then 
      setSoundPaused(sound, true) 
    end 
end  
bindKey("i","down", ) 

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

Todavia no entendiste el fundamento de las funciones..

A ver pensa, vos aprendiste por ejemplo variables en el colegio? (solo para saber, porque asi puedo compararlo)

Si cada funcion tiene sus variables o argumentos en este caso, entonces el isPedInVehicle va a tener el suyo que es el Ped (en este caso seria el localPlayer)

Lo mismo para isPedOnGround.

Yo se que usas la base de otros (que no esta mal porque bueno se empieza asi a veces), pero trata de entender porque lo hacen asi. De esa forma, tendras muchas menos dudas y ademas...cualquier funcion que no sepas, podras ser capaz de enternderla solo leyendo la Wiki.

Igual todo lleva su tiempo. :) :)

WRS( World Racing Server) [server] = 8%

  • Recently Browsing   0 members

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