Jump to content

help me with command to imort handling


AnDReJ98

Recommended Posts

hi guys

i try to call hedit to imort my handlings

this server side

wz = {} 
function set(plr) 
local myVeh = getPedOccupiedVehicle(plr) 
 call (getResourceFromName("hedit"),"importHandling",myVeh,'1600.0 2200.0 0.1 0.0 0.0 -0.05 70 0.50 0.8 0.70 5 300.0 33.0 16.0 F P 5.4 0.90 1 45.0 0.95 0.14 0.0 0.80 -0.10 0.5 -0.7 0.00 0.00 19000 0 0 0 3 0') 
end 
addCommandHandler("set",set) 

but in console show me this error

EROOR: CALL : Failed to call hedit 'importHandling'

please some one help me

Link to comment
hi guys

i try to call hedit to imort my handlings

this server side

wz = {} 
function setH(plr) 
local myVeh = getPedOccupiedVehicle(plr) 
 call (getResourceFromName("hedit"),"importVehicleHandling",myVeh,'1600.0 2200.0 0.1 0.0 0.0 -0.05 70 0.50 0.8 0.70 5 300.0 33.0 16.0 F P 5.4 0.90 1 45.0 0.95 0.14 0.0 0.80 -0.10 0.5 -0.7 0.00 0.00 19000 0 0 0 3 0') 
end 
addCommandHandler("set",setH) 

but in console show me this error

EROOR: CALL : Failed to call hedit 'importHandling'

please some one help me

  
function setH(plr) 
local myVeh = getPedOccupiedVehicle(plr) 
 call (getResourceFromName("hedit"),"importVehicleHandling",myVeh,'1600.0 2200.0 0.1 0.0 0.0 -0.05 70 0.50 0.8 0.70 5 300.0 33.0 16.0 F P 5.4 0.90 1 45.0 0.95 0.14 0.0 0.80 -0.10 0.5 -0.7 0.00 0.00 19000 0 0 0 3 0') 
end 
addCommandHandler("set",setH) 

Link to comment
hi guys

i try to call hedit to imort my handlings

this server side

wz = {} 
function setH(plr) 
local myVeh = getPedOccupiedVehicle(plr) 
 call (getResourceFromName("hedit"),"importVehicleHandling",myVeh,'1600.0 2200.0 0.1 0.0 0.0 -0.05 70 0.50 0.8 0.70 5 300.0 33.0 16.0 F P 5.4 0.90 1 45.0 0.95 0.14 0.0 0.80 -0.10 0.5 -0.7 0.00 0.00 19000 0 0 0 3 0') 
end 
addCommandHandler("set",setH) 

but in console show me this error

EROOR: CALL : Failed to call hedit 'importHandling'

please some one help me

  
function setH(plr) 
local myVeh = getPedOccupiedVehicle(plr) 
 call (getResourceFromName("hedit"),"importVehicleHandling",myVeh,'1600.0 2200.0 0.1 0.0 0.0 -0.05 70 0.50 0.8 0.70 5 300.0 33.0 16.0 F P 5.4 0.90 1 45.0 0.95 0.14 0.0 0.80 -0.10 0.5 -0.7 0.00 0.00 19000 0 0 0 3 0') 
end 
addCommandHandler("set",setH) 

not work

EROOR: CALL : Failed to call 'hedit:importVehicleHandling'

Link to comment
Start the resource "hedit".

yes i start this resource

  
function setH(plr) 
local myVeh = getPedOccupiedVehicle(plr) 
 call (getResourceFromName("hedit"),"importVehicleHandling",myVeh,'1600.0 2200.0 0.1 0.0 0.0 -0.05 70 0.50 0.8 0.70 5 300.0 33.0 16.0 F P 5.4 0.90 1 45.0 0.95 0.14 0.0 0.80 -0.10 0.5 -0.7 0.00 0.00 19000 0 0 0 3 0') 
end 
addCommandHandler("set",setH) 

but still get me error

EROOR: CALL : Failed to call 'hedit:importVehicleHandling'

Link to comment

"hedit" has the function: "importHandling" client-side, you can try exporting it on the meta.xml adding:

function="importHandling" type="client"/> 

and then you can use in your script (client side of course):

function setH() 
local myVeh = getPedOccupiedVehicle(localPlayer) 
exports["hedit"]:importHandling(myVeh,'1600.0 2200.0 0.1 0.0 0.0 -0.05 70 0.50 0.8 0.70 5 300.0 33.0 16.0 F P 5.4 0.90 1 45.0 0.95 0.14 0.0 0.80 -0.10 0.5 -0.7 0.00 0.00 19000 0 0 0 3 0') 
end 
addCommandHandler("set",setH) 

Link to comment
Did you add the line I told you to the meta.xml?

yes i add this

meta.xml in resource hedit

and this in my script clint side

function setH() 
local myVeh = getPedOccupiedVehicle(localPlayer) 
exports["hedit"]:importHandling(myVeh,'1600.0 2200.0 0.1 0.0 0.0 -0.05 70 0.50 0.8 0.70 5 300.0 33.0 16.0 F P 5.4 0.90 1 45.0 0.95 0.14 0.0 0.80 -0.10 0.5 -0.7 0.00 0.00 19000 0 0 0 3 0') 
end 
addCommandHandler("set",setH) 

Link to comment

Jesus.. I thought I could do some other projects instead of hedit :/

Use this export for now:


setHandlingFromTable ( element vehicle, table handlingConfig )

vehicle: The vehicle you want to modify

handlingConfig: The handling configuration you want to apply, in a property = value table.

There's not really an alternative yet. I might see if I can do some work again on hedit, but meh, I lost the interest in it :/

Link to comment
Is hedit resource running?

Show hedit meta.xml.

Show your meta.xml.

yes its running

this meta.xml

    "Ingame Handling Editor" version="2.0.0" type="script" author="Remi-X" description="The first, and only ingame handling editor available for San Andreas, made with MTA ofcourse!" /> 
  
    -- Required Client-Scripts --> 
    

this my client

function setH() 
local myVeh = getPedOccupiedVehicle(localPlayer) 
exports["hedit"]:importHandling(myVeh,'1600.0 2200.0 0.1 0.0 0.0 -0.05 70 0.50 0.8 0.70 5 300.0 33.0 16.0 F P 5.4 0.90 1 45.0 0.95 0.14 0.0 0.80 -0.10 0.5 -0.7 0.00 0.00 19000 0 0 0 3 0') 
end 
addCommandHandler("set",setH) 

my meta.xml

    

thanks you

Link to comment
Jesus.. I thought I could do some other projects instead of hedit :/

Use this export for now:


setHandlingFromTable ( element vehicle, table handlingConfig )

vehicle: The vehicle you want to modify

handlingConfig: The handling configuration you want to apply, in a property = value table.

There's not really an alternative yet. I might see if I can do some work again on hedit, but meh, I lost the interest in it :/

thanks you so much

like this

this hedit meta.xml

    "Ingame Handling Editor" version="2.0.0" type="script" author="Remi-X" description="The first, and only ingame handling editor available for San Andreas, made with MTA ofcourse!" /> 
  
    -- Required Client-Scripts --> 
    

and my script

server.lua

function setH() 
local myVeh = getPedOccupiedVehicle(localPlayer) 
exports["hedit"]:setHandlingFromTable(myVeh,'1600.0 2200.0 0.1 0.0 0.0 -0.05 70 0.50 0.8 0.70 5 300.0 33.0 16.0 F P 5.4 0.90 1 45.0 0.95 0.14 0.0 0.80 -0.10 0.5 -0.7 0.00 0.00 19000 0 0 0 3 0') 
end 
addCommandHandler("set",setH) 

meta.xml

    

but not work why?

Link to comment
Becausr you do not read what i said. You gotta use a HANDLING TABLE, not a STRING.. Besides, what is your version of hedit? That XML looks awfully old.

yes its old

version="2.0.0"

like this

wz = {"1600.0","2200.0","0.1","0.0","0.0","-0.05","70","0.50","0.8","0.70","5","300.0","33.0","16.0","F","P","5.4","0.90","1","45.0","0.95","0.14","0.0","0.80","-0.10","0.5","-0.7","0.00","0.00","19000","0","0","0","3","0"} 
function setH() 
local myVeh = getPedOccupiedVehicle(localPlayer) 
exports["hedit"]:setHandlingFromTable(myVeh,wz) 
end 
addCommandHandler("set",setH) 

but still not work

0d32464b63f4.png

Edited by Guest
Link to comment

That's because you didn't change "localPlayer".

wz = {"1600.0","2200.0","0.1","0.0","0.0","-0.05","70","0.50","0.8","0.70","5","300.0","33.0","16.0","F","P","5.4","0.90","1","45.0","0.95","0.14","0.0","0.80","-0.10","0.5","-0.7","0.00","0.00","19000","0","0","0","3","0"} 
  
function setH(thePlayer) 
local myVeh = getPedOccupiedVehicle(thePlayer) 
exports["hedit"]:setHandlingFromTable(myVeh,wz) 
end 
addCommandHandler("set",setH) 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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