Jump to content

Noah_Antilles

Members
  • Posts

    60
  • Joined

  • Last visited

Everything posted by Noah_Antilles

  1. Thanks for your reply I am busy with a lot of different models atm, but I will make another video once I finished the canyon. I will certainly add some rocks in there!
  2. Thanks a lot for your reply @Mr.Loki I did not expect such an answer to be honest, and as a beginning scripter this seems pretty intimidating. But I am sure this will help me a lot in the long run. Thanks once again
  3. Hello, I've been struggling with this last part of a script I'm making. Basically an object spawns, and needs to be launched forwards. However, this doesn't happen. the object just sits still. function rustlerCreateProjectile() local vehicle = getPedOccupiedVehicle(localPlayer) if(vehicle)then if getElementModel(vehicle) == 476 and rustler50calstate == 1 then outputChatBox ("50cal firing") elseif rustler20mmstate == 1 then outputChatBox ("20mm cannons firing") elseif rustler37mmstate == 1 then local x, y, z = getElementPosition(vehicle) local rx, ry, rz = getElementRotation(vehicle) local projectile37mm = createObject (2686, x, y, z, rx, ry, rz, true) local projectileattach = attachElements (projectile37mm, vehicle, 0, 4.3, -0.15) setTimer (function() detachElements (projectile37mm) end, 50, 1) setTimer ( function() setElementVelocity(projectile37mm, 0, 0, 50) --this is the part that I cannot get to work --destroyElement ( projectile37mm ) end, 50, 1 ) outputChatBox ("37mm cannon firing") end end end bindKey("mouse1", "down", rustlerCreateProjectile) What am I missing?
  4. SetVehiclePanelState has the information I was looking for, thanks for your help!
  5. Thanks for your reply, I had no idea this was a custom function. To bother you once more; where can I download this custom function?
  6. Hello, I've been trying to attach an effect to a vehicle, which in my understanding should work. I'm getting this error: ERROR: attempt to call global 'attachEffect' (a nil value) function rustlerEngine() local vehicle = getPedOccupiedVehicle(localPlayer) local x, y, z = getElementPosition(vehicle) local rx, ry, rz = getElementRotation(vehicle) local engineSmoke = createEffect ( "smoke30m", x-3, y, z, rx, ry, rz ) if(vehicle)then if getElementModel(vehicle) == 476 then toggleControl ( "accelerate", false ) toggleControl ( "brake_reverse", false ) attachEffect(engineSmoke, vehicle) setEffectSpeed(engineSmoke, 10) outputChatBox ("simulating loss of engine", 0, 190, 255) end end end bindKey("0", "down", rustlerEngine) What am I missing?
  7. I found no information of interest while looking at that event, could be just me, perhaps I am missing something. Is it perhaps hardcoded? I remember it's possible to "simulate" damage on cars, by popping its tires for example.
  8. Hello there, I've got a quick question regarding airplanes. When a specific part of an airplane is damaged - its right wing, for example. The right wing's aileron becomes unstable, making the plane rotate left and right on random. Is there any way to damage this specific part of an airplane? so one can for example type /damagerightwing and the right wing gets damaged. Thanks in advance, Noah
  9. Thanks for your reply! For now I only simple scripting methods, once I learn more about scripting I might use those global variables and more advanced methods. I personally prefer the way it is now, so the answer would be no. Thanks once again
  10. Hello there! I've got a quick question regarding the size of scripts. I'm running a 700 line script to change, alter and modify the weapons in my server. You can imagine this script is constantly being run in a TDM server. So my question is as follows: Is it better, more efficient to have one big script like mine (700 lines) or multiple, smaller ones (7 scripts consisting of 100 lines each)? Thanks for your time!
  11. Hello @UnchiuDawg, This particular building/object is prelighted that way by the original Rockstar Developers. This means it's not possible to get rid of this peculiar lighting by shaders (as far as I know) with prelighting you pre light an object, for example a road, so certain lights are rendered there and thus saving memory. You can however take this specific object, export it, prelight it yourself, and import it once again in your own server/map. Here is a prelighting tutorial CodyJ(L) once send to me: http://gtaforums.com/topic/273217-3dsmax-radiosity-advanced-lighting/ Good luck!
  12. @StormFighter Thanks for your reply! I think it would be strange that it's not possible to change an aircraft's handling, since it's possible in SAMP. Hopefully there is another way to do it.
  13. Hello there, Recently I've been trying to change the handling of the rhino and beagle using setVehicleHandling. The problem is very simple, it doesn't work. When I change the vehicle ID to a regular car (infernus, banshee or what have you) it works perfectly Is it not possible to change the handling of aircraft and the rhino? or is there some other way to change it? For now I just want to alter the accelation and top speed of the vehicle (I took the script from the mta wikia) function vhandling ( ) for _,v in pairs(getElementsByType("vehicle")) do if getElementModel(v) == 432 then -- Rhino ID, any regular car ID works, rhino doesn't setVehicleHandling(v, "maxVelocity", 30000.0) setVehicleHandling(v, "engineAcceleration", 30000.0) end end end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), vhandling ) Thanks in advance!
  14. Hi @Zorgman! I've been struggling with the same problem, but I've tried something that might help you. I have not succeeded yet, and I am a scripting beginner, so take this with a grain of salt. You can use setPedAnimation whenever a player with a silenced is shooting/aiming/walking. Specify the path to the animation table that contains the rifle's animations, and you should be golden. Like I said I haven't been able to successfully incorporate this in my own server yet, but maybe you will find a way to do it Good luck!
  15. @ignatius I used Autodesk Maya to model/make the Canyon, and then exported it to Autodesk 3DS Max where I could export it once again to a .DFF and .COL file. (These are the files that GTA uses, DFF is the model itself. COL is the collision file) As for a tutorial there are loads of modelling tutorials on YouTube that focus on making 3D models for GTA SA. I myself am a certified 3D modeller with 5 years of experience, and my advice would be to start small with your models. Create a small house or building, try to import it in GTA and learn from your mistakes. Good luck!
  16. No, it will be used on my own server. Thank you
  17. This looks and feels amazing, the atmosphere is great, the visuals are gorgeous, and the music only adds to that awesome feeling. Absolutely amazing!
  18. @CodyJ(L) Yeah I've been trying to find out how exactly, when I try to assign a LOD to those models nothing happens
  19. @Skarbonke Thanks for your feedback I can put the water level up quite easily, but a dry canyon also looks cool in my opinion
  20. @IIYAMA Thanks again mate, small mistake I hadn't seen. It works now
  21. Hello! I have almost finished a script, but I have some trouble figuring this problem: What I want to do is to save a certain vehicleComponent's rotation, and call on that rotation/value later on. But I get the error: Attempt to perform arithmetic on global 'ox' (a nil value) From what I can see the setElementData doesn't save the original value for some reason. setElementData should save the rotation of "gear_f" here under the name "ox" (original rotation on x-axis) function shamalDisableGear() local vehicle = getPedOccupiedVehicle(localPlayer) local ox = getVehicleComponentRotation(vehicle, "gear_f") -- should save it here local originalRotation = setElementData(vehicle, "gear_f", ox, true) -- should save it here if(vehicle)then if getElementModel(vehicle) == 519 then toggleControl ("sub_mission", false) end end end addEventHandler ( "onClientPlayerVehicleEnter", getLocalPlayer(), shamalDisableGear ) Later on, when the setElementData is called by getElementData: function shamalGearFront(button, press) local vehicle = getPedOccupiedVehicle(localPlayer) if(vehicle)then if getElementModel(vehicle) == 519 then if button == "2" and (press) then if gearstate == 0 then local rx, ry, rz = getVehicleComponentRotation(vehicle, "gear_f") setTimer(function () rx = rx - 3 if rx < 0 then rx = 360 - rx end setVehicleComponentRotation(vehicle, "gear_f", rx-3, ry, rz) end,50,33) elseif gearstate == 1 then if getElementData(vehicle, "gear_f", ox, true) then -- it seems it doesn't save the original value (ox) setVehicleComponentRotation(vehicle, "gear_f", ox-90, oy, oz) setTimer(function () rx = rx +1 setVehicleComponentRotation(vehicle, "gear_f", rx+1, ry, rz) end,50,90) end end end end end end addEventHandler ( "onClientKey", root, shamalGearFront ) What is causing this problem? Thanks in advance for your help, -Noah
  22. @IIYAMA damn, this works perfectly aswell if you don't mind I have one last problem: When I press "u"" again the components with negative values move another -90 degrees instead of rotating to their original location. The components using a positive value don't share this problem, they work perfectly. What can I do now?
  23. @IIYAMA It finally works! thanks for your help. I however have one more question, The opposite component also needs to rotate, but this time it needs to rotate -90 degrees instead of +90 degrees. When I do this however I get the debugging error: "expected positive, got negative" which makes me think that rotating components using a minus/negative value is not possible. But it should be possible, some way or another.. right?
  24. @3laa33 It's a custom component I named that way. It works because it used to move with my old script. @IIYAMA I tried putting it inside the function. It works for half a second, and then stops again. Where do I need to put it exactly?
  25. @IIYAMA I'm not that incompetent. debugging didn't give any error, hence why I simply told @3laa33 that it doesn't work. The component's name is correct, I double checked it. How do I update the ry value?
×
×
  • Create New...