Jump to content

Ace_Gambit

Members
  • Posts

    569
  • Joined

  • Last visited

Everything posted by Ace_Gambit

  1. I'm not sure if anyone mentioned it before but this function seems to do nothing. I tried it on multiple elements and they all stream in and out regardless what boolean parameter is passed.
  2. What parts of Liberty City were used back in those days? I am importing the mafia mansion to MTA. I could just as well import the entire hilltop. And I am also trying to convert the classic Dodo model to SA. Edit: I was thinking of the selected area's (red parts).
  3. You can only cancel damage to a player on the client side. Calling cancelEvent() in onClientPlayerDamage will do the trick.
  4. You can use MEd to get the right object id's.
  5. Correct me if I'm wrong but I think that has to do with the fact that the client script is not fully loaded yet.
  6. The engine functions are a bit buggy. Hopefully DP3 is going to solve this. But right now replacing lots of vehicle models can easily crash your client. You could try to use the element streamed in call back function and replace only those vehicles that are within streaming range. This is no guarantee for success but may provide a more stable workaround.
  7. Why not use the current tick count method? You can easily create a time-out using the current and previous tick event. For example: local previousTick = getTickCount() local delay = 5000 -- delay loop with 5000ms (5 seconds) function onClientRender() if (getTickCount() > previousTick + delay) then -- do your thing... previousTick = getTickCount() end end
  8. It supports objects, vehicles, pickups (which include things like weapons, health and armour), blips, radar areas, collision shapes, markers, cameras, spawn points, game areas, flags and objectives. Support for map boundaries is not yet implemented because it has slightly different positioning attributes. But it wouldn't take too much effort to add these as well. I'll upload a new version in a few hours that allows you to choose what element types to move.
  9. All I can say is that the camera function is buggy in DP2. Multiple people have reported camera issues when you join a server for the first time. Sometimes setting the camera works and when it doesn't the camera seems to be stuck at 0,0,0 (that is indeed at the farm). Also note that you can not set the camera position and look at target in the same frame. The part where you fall through the "world" is almost certainly related to the instability of the camera functions. Somehow setting the camera in the client render event while the camera is still in fixed mode can trigger fatal bugs to the MTA streamer. In short, don't set the camera position or look at target when the camera is in fixed mode. This causes instabilities like objects disappearing and falling through the "world".
  10. The output is written to the debug log file (or it should). Let me know if it's working or not. Edit: The tool is rejecting negative numbers lol (pretty dumb scripting mistake I have made). I will fix this asap. Edit: Done.
  11. Maybe this is helpful https://community.multitheftauto.com/index.php?p= ... ils&id=179. I was bored today and made this very simple tool that moves all elements relative to the original position. The XML tags are dumped to the debug log file so you will have to do some copy/pasting afterwards.
  12. Like Mr.Hankey said the code as multiple syntax errors. You have v defined in the for loop as value but it never has a value assigned to it. for k in Should be: for k, v in Secondly getElementsByType returns a indexed table and not a paired table. Therefore: for k, v in pairs Should be: for k, v in ipairs Codelisting (how it should work). server.lua local gatesTable = { } -- it defines a table addEventHandler( "onResourceStart", getResourceRootElement( getThisResource( ) ), function( ) local gates = getElementsByType( "gate" ) for _, gate in ipairs( gates ) do local x, y, z = tonumber((getElementData( gate, "posX" ) or 0)), tonumber((getElementData( gate, "posY" ) or 0)), tonumber((getElementData( gate, "posZ" ) or 0)) table.insert( gatesTable, createObject( 975, x, y, z ) ) end end ) -- now gatesTable will contain all object elements (returned from createObject) and now you can use this table to move a gate if (gatesTable [ 1 ]) then moveObject( gatesTable [ 1 ], 5000, 5, 0, 0 ) -- this will move the 1st gate created end meta.xml "" type="gamemode" author="" name="gates" version="" /> mapfile.map "" type="map" gamemodes="gates" author="" name="" version="" /> "1" posX="0" posY="0" posZ="0" />
  13. There have been several topics addressing this issue. And from what I understand it is MTA related. The pickups are rendered by the MTA engine and placing them far away results in the actual pickup not showing. Hopefully DP3 will solve this.
  14. Ace_Gambit

    Mta codes

    If the object is part of the GTA world I can ensure you this is not possible.
  15. The alternative method is to extract the jetpack model (jetpack.dff) from the gta3.img archive and import it with one of the engine functions.
  16. Wow, wouldn't it be easier to design your database with relational tables instead of creating one big bulk of redundant fields?
  17. He means a stand-alone browser that is distributed as part of MTA. I agree on this from a user friendly point of view. With a stand-alone browser you don't have to start GTA in order to find a server. But this should not be on the to-do list. It is just a suggestion.
  18. Peds are nice as a sidekick when you get bored of playing against all those other players in the fully filled DM servers and you just want kill some. You can implement basic attack features with the rotational and control state functions. For example: Pseudo code ped = createPed(288, pX, pY, pZ) setPedRotation(ped, targetRot) setPedControlState(ped, "aim_weapon", true) setPedControlState(ped, "fire", true)
  19. Ace_Gambit

    Image

    There are many ways to achieve that. Here's one way of doing it. 1) Use MEd to get the associated object texture and extract it with IMGTool. 2) Export the compressed images from the txd file and edit it with your favourite image processing tool (Photoshop for example). 3) Rebuild the txd archive with the modified images previously extracted. 4) Use one of the Engine functions to replace the textures.
  20. This is not possible because the GTA world is not the same as the MTA world. Changing the object model in the MTA world does not have any effect on objects with the same model in the GTA world.
  21. You are talking about already scripted features in the GTA engine. He's talking about modifying parts of the GTA world that probably requires interference with the original files which is against the license agreement. MTA is legal because it does not alter any GTA files. I don't know exactly how MTA works but my best guess is that the current architecture doesn't even allow these kinds of changes.
  22. I don't think they will ever implement that because it could possibly violate copyrights.
  23. I haven't looked at the code but my advice is to comment the parts where you suspect the script turns bad (possibly somewhere inside a nested loop). And uncomment the sections line by line and see if the has any positive effect. It could very well be that at some point a function result inside the loop does not return the correct values. Even though this may not show as an error in your debug window the code could still raise internal exceptions during execution. I've seen it before when a function call inside a loop was not made in the correct way (typo, wrong parameters etc.) the script seemed to "lag".
  24. I am almost absolutely sure this has to do with the player not being fully spawned yet. I did some testing a few weeks ago that resulted in similar issues with the blip not being attached when it was created during the first time a player spawns (right after joining the server). The blip was created but never attached because apparently it had nothing to attach to. I solved this by auto-refreshing all player blips each time a player spawned.
×
×
  • Create New...