Jump to content

50p

Retired Staff
  • Posts

    2,973
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by 50p

  1. I haven't touched the project for couple of weeks but I'm back to it and I'm hoping to make a proper model viewer as well. As you can see in the last video I posted here, I made an .img viewer as well, that means I can import GTA models right to 3DS Max without exporting the model from .img and then manually importing it with KAM's script, I just double click the file from the list and it imports that model for me. I'm really excited about this project especially when I achieve something I've always wanted. I'm not sure if you've seen the latest screenshot I showed the guys on IRC, DuTcHtUrK, because yesterday I finally made a working TXD viewer for 3DS Max: Here are some more screenshots of the tools that will come as a package/kit (these are still in development so there may be more): https://dl.dropboxusercontent.com/u/437 ... viewer.png https://dl.dropboxusercontent.com/u/437 ... terial.png https://dl.dropboxusercontent.com/u/437 ... sample.png <-- map settings shown in the map settings window are taken from the meta.xml and these are also saved within .max file so that you can save your map in 3DS Max and re-open it the settings will load with the map! I don't know of any release date but I'm sure I will inform you guys here. There are some minor bugs but I'll make sure they are gone before release, also I've still got to do the model previewer which will work similarly to the TXD viewer but instead of the actual texture it will show the model. Have a nice day!
  2. @adrenalineSYS, Yes, you can. All my resources are free, open source and I don't mind people modify them as long as I'm in the credits. @Threule, I made this as a simple drift resource with ability to do with it whatever you want. As I said in the resource description on the community site, the resource has custom events and there is just 1 .lua script which does all the UI things, like showing the multiplier (combo) or best score. I made it fully customizable, well I tried and it's up to you how you make it work. I don't think I'll add something like you suggested but I like that idea too.
  3. You can round up the speed: local speedStr = string.format( "%d", yourSpeedVar ); -- speedStr will be string: "120" Vehicles start burning at roughly 250hp, their maximum health is 1000hp. Once they start burning the health decreases slowly and eventually when it reaches 0 they explode. So, as you may know, when the vehicle is burning and you keep shooting at it the health decreases more quickly what makes them explode sooner then if you just watched it burning. So you can use vehicle's health percentage (0-1) instead of the actual value (0-1000) local vehHealthPercent = (vehHealth - 250) / 1000; -- vehHealthPercent will be < 0 when vehicle is burning
  4. 50p

    Katana

    Can you attack with other weapons? If you can't then your fire key has been changed, if you can use other weapons then probably script disabled the key for katana. You can use copygtacontrols command to reassign all default GTA controls (left mouse will be re-assigned to fire). If it will not work immediately, then restart MTA and try again.
  5. Share here how you solved it so others may find this in the future. Thanks.
  6. @Blaawee, What do you mean rotate in Z? Like this? You can simulate it by changing image's position and size. I'm not sure if drawing image with negative size values would flip the image horizontally/vertically. That's how you would animate sprites in Flash or gif (like the example here). Or, you can create a sprite sheet of the rotation and use my SpriteAnim to play the animation viewtopic.php?f=108&t=49179&p=560177
  7. According to this http://www.gtaforums.com/index.php?showtopic=158088 nitro component is named "ug_nitro". You can always try to use getVehicleComponents and output all the components to see yourself. As far as I remember, vehicle components need to have a mesh attached to the dummy/component and ug_nitro dummy doesn't have any children/meshes attached to it, so getVehicleComponents may not return that. It may also only return 1 of the wheel dummies because only 1 wheel model is attached to the wheel dummy of the vehicle.
  8. Locked. Minotaur, use the previous topic you created as IIYAMA posted. There is no need for another same topic.
  9. Simple shader with new font texture would be enough to do that.
  10. @mcer, There is no need for type="client" attribute in tag. All the files added as will be downloaded by client unless download="false" is added but only available from 1.4 onward. Still the wheels will be white. @Minotaur, txd = engineLoadTXD( "J2_wheels.txd" ); -- this is only needed once for 1 .txd file -- then before each model replacement: engineImportTXD( txd, 1077 ); -- do this for each model ID engineImportTXD( txd, 1083 ); -- etc.
  11. The models are white because you have to load and replace the textures before you replace models.
  12. 50p

    help

    @WASSIm. You seem to struggle with creating more advanced scripts. Why don't you learn by simply understanding the event system and element tree then some Lua basics and after that you can start creating simple scripts like output message to chat box when someone joins in the server? This is what I suggest you do. You come here with a script more advanced than you can create and ask for fix? The use of createProjectile is simpler than setTimer so the script can't be yours, do you even have privileges to publicly post parts of the code? Please, understand that we are not going to create/fix the scripts for you especially if they are not yours. For your information, I'm locking this topic due to stolen script being posted here. If you have a good reason and want me to open it, let me know via private message.
  13. Short: get position of element on screen instead of camera position on the screen. Ask yourself: why do I get camera position on my screen and how is that even possible?
  14. 50p

    help blip

    If you simply changed the script type in meta.xml from client to server then it should work only when zombies spawn/die. Your script is a mixture of client and server side scripts. 1. You're using onClientResourceStart - client-side event 2. onZombieSpawn and onZombieWasted - both look like server-side events (check the zombie resource documentation)
  15. It has slowed down drastically due to me learning OpenGL. I want to include a preview window so that you can view the models before you import them, as well as a TXD viewer to preview textures. I've made a TXD material that is pretty slow because of drawing pixels onto bitmaps being very slow in MAXScript but basically I can open .txd files in Material editor and apply them to models. It's still in very early stage and material IDs don't match the mesh material IDs. Also, it's difficult to make dynamic UI in 3DS Max because the UI is pretty much static, that is, all UI elements have to be defined at once in a script. So, making scripts in MAXScript like mine isn't that much fun.
  16. What do you mean you don't know why? xXMADEXx, you're trying to get point on screen of camera's position. Camera position is at the position of the screen. onClientRender gets triggered after all elements' position get updated and other GTA stuff get renered, so there may be some "delay" if you want to draw something or update position of the camera. I'll now explain why it returns false SOMETIMES. An example: addEventHandler( "onClientRender", root, function( ) local x,y,z = getElementPosition( localPlayer ); setCameraMatrix( x,y,z+15, x,y,z ); end ); Try this script yourself. It's a simple old school top-down GTA camera. When you're moving the camera will follow, the problem is that the faster you move the more "shaky" the camera will be (test it to see what I mean) but if you'll use onClientPreRender then camera will be smooth just like you'd expect it to be. The reason is that onClientPreRender is triggered right after the GTA positions are updated and before all the world rendering. The reason why you get false sometimes is because the camera position gets updated and after all other rendering stuff you get camera's position (GTA:SA processing order). I'm pretty sure it will return false if the camera is not moving at all, am I correct? It's difficult to explain it for me in detail but I hope you get the idea. So, I suggest you get screen position of the element that you want to draw the text for. Currently your code would render all the text in the middle of the screen only when scx will not return false. Read the line 4, is that where you want to draw all the text? At the position of local player or element from drawData table?
  17. 50p

    help blip

    These events need to be triggered. Are they triggered when zombies spawn/die? To me it looks like these events may be triggered but server-side only and you're trying to use these events in a client-side script.
  18. Instead of getting distance between localPlayer and the element, check the distance between camera and element position. Also, the line of sight, you're checking if the line of sight is clear but you're not disabling the peds collision detection, so this will fail.
  19. 50p

    MTA:SA 1.4

    Basically, shared files are used to define functions that can be used on both sides: client and server. For example you may have some math or table functions that work on both sides. eg: function table.equal( t1, t2 ) -- check if 2 tables are the same for i, v in pairs( t1 ) do if t2[ i ] ~= v then return false; end end return true; end This is very simple example, as you can see, this script doesn't use any MTA functions and therefore it can be used on client and server side thus "shared".
  20. 50p

    MTA:SA 1.4

    OOP-wise, they're still working on it. First they want to implement OOP client-side only and then translate it to server-side. There will be useful classes that will make things easier eg. vectors and matrices for position translation. For instance freecam resource can be shrank down from ~200 lines down to ~30 lines of code, that's because of all the calculations being done with math functions; vectors and matrices makes things simple The classes will be self explanatory, eg: Ped, Vehicle, etc. and will work the following way: local myPed = Ped.create( 0, 0.0, 0.0, 3.0 ); -- create a CJ ped at 0,0,3 myPed:position( 100.0, 100.0, 4.0 ); -- set myPed position to 100, 100, 4 local newPos = Vector3D( -104, 140, 15 ); myPed:Position( newPos ); -- set new position by vector local myVeh = Vehicle( 560, 0, 0, 4 ); -- create Sultan at 0, 0, 4 myVeh.health = 500; -- set the vehicle's health to 500 myPed.vehicle = myVeh; -- waprs the myPed to myVeh (waprs CJ to Sultan); localPlayer.skin = 3; -- change local player's skin to 3 There is plenty more to describe about the new OOP but these are just simple examples I can think of.
  21. 50p

    double side

    for _, obj in pairs( getElementsByType( "object" ) ) do setElementDoubleSided( obj, true ); end
  22. 50p

    3D hud

    Yes, you can use math.rad() instead: local newX,newY,newZ = pX + math.cos( math.rad( rz ) ), pY + math.sin( math.rad( rz ) ), pZ
  23. Because function called by command sends different arguments. player playerSource, string commandName, [string arg1, string arg2, ...]
  24. Make the table an index table and then sort it before you populate the grid list. You can also use table.insert function to insert each class to the table in the same order it was loaded from the xml file. Once you have an index table iterate it with ipairs instead of pairs, this way the order will always be the same since pairs does not always iterate in the same order.
  25. Edit the map object placement? You can load the map in Map Editor and edit it as you wish. If you're a 3D modeler then I have something for you, well, I'm working on a MAXScript that will let users import GTA models to 3DS Max with just a few clicks. It will also be able to export .map files and any custom models that will be part of the map. I've been working hard for a week so to learn OpenGL to preview models before importing. Anyway, once I'm sure what I'm doing I'll release some of the tools (scripts) for 3DS Max.
×
×
  • Create New...