AnDReJ98 Posted January 27, 2012 Share Posted January 27, 2012 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
BriGhtx3 Posted January 27, 2012 Share Posted January 27, 2012 lol, at first rename your function oO Never use a functionname which is given to another function Link to comment
TAPL Posted January 27, 2012 Share Posted January 27, 2012 https://wiki.multitheftauto.com/wiki/Res ... ing_Editor Link to comment
Al3grab Posted January 27, 2012 Share Posted January 27, 2012 hi guysi 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
AnDReJ98 Posted January 27, 2012 Author Share Posted January 27, 2012 hi guysi 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
Kenix Posted January 27, 2012 Share Posted January 27, 2012 I am assume resource hedit not running. Link to comment
AnDReJ98 Posted January 27, 2012 Author Share Posted January 27, 2012 I am assume resource hedit not running. no its running Link to comment
Castillo Posted January 27, 2012 Share Posted January 27, 2012 Start the resource "hedit". Link to comment
AnDReJ98 Posted January 27, 2012 Author Share Posted January 27, 2012 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
Castillo Posted January 27, 2012 Share Posted January 27, 2012 "hedit" doesn't has any exported function, I can't either see any function called "importVehicleHandling". Link to comment
AnDReJ98 Posted January 27, 2012 Author Share Posted January 27, 2012 "hedit" doesn't has any exported function, I can't either see any function called "importVehicleHandling". thanks you solidsnake14 how to call hedit from command to import my handling? Link to comment
Castillo Posted January 27, 2012 Share Posted January 27, 2012 "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
AnDReJ98 Posted January 27, 2012 Author Share Posted January 27, 2012 ERROR:call : failed to call "hedit:importHandling" [ string "?" ] Link to comment
Castillo Posted January 27, 2012 Share Posted January 27, 2012 Did you add the line I told you to the meta.xml? Link to comment
AnDReJ98 Posted January 27, 2012 Author Share Posted January 27, 2012 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
Castillo Posted January 27, 2012 Share Posted January 27, 2012 Sorry, my bad, it's "export" not "exports" in meta.xml function="importHandling" type="client"/> Link to comment
AnDReJ98 Posted January 27, 2012 Author Share Posted January 27, 2012 Sorry, my bad, it's "export" not "exports" in meta.xml function="importHandling" type="client"/> sory solidsnake14 but still error ERROR:attemt to call nil value ERROR:call : failed to call "hedit:importHandling" [string "?" ] thanks you for help me Link to comment
JR10 Posted January 28, 2012 Share Posted January 28, 2012 Is hedit resource running? Show hedit meta.xml. Show your meta.xml. Link to comment
Deltanic Posted January 28, 2012 Share Posted January 28, 2012 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
AnDReJ98 Posted January 28, 2012 Author Share Posted January 28, 2012 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
AnDReJ98 Posted January 28, 2012 Author Share Posted January 28, 2012 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
Deltanic Posted January 28, 2012 Share Posted January 28, 2012 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. Link to comment
AnDReJ98 Posted January 28, 2012 Author Share Posted January 28, 2012 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" Link to comment
AnDReJ98 Posted January 28, 2012 Author Share Posted January 28, 2012 (edited) 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 Edited January 28, 2012 by Guest Link to comment
Castillo Posted January 28, 2012 Share Posted January 28, 2012 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now