Jump to content

lolek123

Members
  • Posts

    17
  • Joined

  • Last visited

Everything posted by lolek123

  1. Hell yea, man! Awesome. I'd never get it myself. Really pleased there are people that are willing to help.
  2. addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function() txd = engineLoadTXD ( "data/Velociraptor/velociraptor.txd" ) engineImportTXD ( txd, 1 ) dff = engineLoadDFF ( "data/Velociraptor/velociraptor.dff" ) engineReplaceModel ( dff, 1 ) txd2 = engineLoadTXD ( "data/Tyrannosaurus/tyrannosaurus.txd" ) engineImportTXD ( txd2, 2 ) dff2 = engineLoadDFF ( "data/Tyrannosaurus/tyrannosaurus.dff" ) engineReplaceModel ( dff2, 2 ) end) addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()), function() ped1 = createPed ( 1, 2471, -1655, 14, 90 ) ped2 = createPed ( 2, 2471, -1658, 14, 90 ) ped3 = createPed ( 1, 2471, -1661, 14, 90 ) ped4 = createPed ( 1, 2471, -1664, 14, 90 ) ped5 = createPed ( 1, 2471, -1667, 14, 90 ) setPedAnimation( ped1, "FAT", "FatSprint") setPedAnimation( ped2, "FAT", "FatWalk", 0, true, true ) end) addEventHandler( "onClientRender", , smooth ) function smooth () root = getRootElement() local x, y, z = getElementPosition( ped2 ) setElementPostion( ped2, x + 10, y, z ) end Help would be appreciated, thank you.
  3. Yo, I replaced a ped with a much bigger one. A dinosaur Now I want to set him an animation. I'm trying to make him walk. My problem is that he takes big steps, but it seems like he's not moving at all. Is there any way that I could speed him up, so I will synchronize the animation with his actual steps? Thanks.
  4. And if I wanted it to pick up the object that is there on the map, instead of creating a new one, would that be doable?
  5. Could you also make it actually pick up the object, it has a bad argument on "attachElements" and I dont know how to specify the object that he has to pick up. Maybe I need to give each of the elements with model ID 2916 their own ID with setElementID?
  6. Client Side: function training(localPlayer, command) if (isElementWithinMarker(localPlayer, myMarker) == true) then local x,y,z = getPedBonePosition(localPlayer, 25) attachElements( object(2916), localPlayer, x,y,z) elseif (isElementWithinMarker(localPlayer, myMarker) == false) then outputChatBox("nope", localPlayer) end end addCommandHandler("train", training) Server Side: function CheckMyObject(res) if res==getThisResource() then for _,object in ipairs(getElementsByType("object")) do if getElementModel(object)==2916 then local x,y,z=getElementPosition(object) local int=getElementInterior(object) local dim=getElementDimension(object) myMarker = createMarker(x,y,z,"cylinder",2.0,255,0,0,125) setElementInterior(myMarker,int) setElementDimension(myMarker,dim) end end end end addEventHandler("onResourceStart",getRootElement(),CheckMyObject) I'm getting bad argument error each time I type in the command, can someone tell me if I have to export "myMarker" somehow from script.lua to client.lua or what?
  7. "for _,object in ipairs(getElementsByType("object")) do" could you kinda explain and simplify this part for me? I dont really understand the in ipairs.
  8. No. I want my server to do an auto check after the server starts.. And whenever it finds an object with Model ID 2916 it will create a marker on it.
  9. How can I make server check my objects and make marker on object model ID 2916, any help? Please.
  10. function attachDumb(thePlayer, command) createdDumb = createObject(2916, 0,0,0) bonePos = getPedBonePosition(thePlayer, 25) attachElements(createdDumb, thePlayer, bonePos) setPedAnimation(thePlayer, "gym", "gym_free_pickup") end addCommandHandler("dumb", attachDumb) Can you tell me what's wrong with this? It shows "attempt to call global 'getPedBonePosition' (a nil value)".
  11. As I said in the subject, I need to make a ped pickup an object after typing in the command, which works only beside the object itself, can anyone please help? Thanks.
  12. Do you think that this funcition will be added to MTA?
  13. Would that work on MTA:SA 1.3 or 1.4?
  14. Hi. How can I attach object to players hands only, and make it move together with them during an animation, that involves hand movement?
  15. function createGym(thePlayer, command, objectModel) local x,y,z = getElementPostion(thePlayer) local createdObject = createObject(2915,x,y,z) end addCommandHandler("gym", createGym) Yea.. It doesnt work. I get this error: "attempt to call global 'getElementPosition' (a nil value) Anyone able to help?
×
×
  • Create New...