Jump to content

FernandoMTA

Recommended Posts

11 hours ago, SpoonTheMan said:

Dang, it's been a long time since I've been active on MTA but with all the amazing breakthroughs that have been happening these last few years I'm starting to think I just might come back soon! I have 3 questions regarding your tool.

1: does it support weapons?

2: can vehicle handling (and possibly weapon stats/effects) be applied independently to added models without changing the handling/stats of the existing content?

3: can added models be added into the F1 menu to be made easy to spawn like the existing content or do you have to enter commands to access added content as a player?

 

Hello! Yes, MTA has come a long way! Let me answer your questions :D

1. To add new weapons you need a workaround script because MTA currently has no way to do like `addWeapon(object ID, ...)` to assign an object some weapon properties and maybe a weapon ID to make it usable.

So because of that, the way you can add a weapon is by adding/replacing an object (with this resource for example) and then make a script to equip that object and shoot with it by equipping a certain existing weapon, making it invisible with shader, and attaching the new object to the ped so it appears that you are shooting from a completely new weapon.

This is the workaround I know and it works fine I guess. Here's some stuff related to weapons from the wiki:

Default weapons list: https://wiki.multitheftauto.com/wiki/Weapons 

Weapon skill levels https://wiki.multitheftauto.com/wiki/Weapon_skill_levels that can be set with https://wiki.multitheftauto.com/wiki/SetPedStat 

Weapon properties: https://wiki.multitheftauto.com/wiki/SetWeaponProperty

 

2. Vehicle handling can be set serverside on new vehicles (it's explained in the documentation :D) and that works fine!

 

3. Sure, if this ever gets implemented into MTA:SA default resources somehow, we can have custom new vehicle/skins appear in the F1 spawn menu!

 

Possibilities are endless my friend!

Edited by FernandoMTA
  • Thanks 1
Link to comment
9 hours ago, FernandoMTA said:

 

Hello! Yes, MTA has come a long way! Let me answer your questions :D

1. To add new weapons you need a workaround script because MTA currently has no way to do like `addWeapon(object ID, ...)` to assign an object some weapon properties and maybe a weapon ID to make it usable.

So because of that, the way you can add a weapon is by adding/replacing an object (with this resource for example) and then make a script to equip that object and shoot with it by equipping a certain existing weapon, making it invisible with shader, and attaching the new object to the ped so it appears that you are shooting from a completely new weapon.

This is the workaround I know and it works fine I guess. Here's some stuff related to weapons from the wiki:

Default weapons list: https://wiki.multitheftauto.com/wiki/Weapons 

Weapon skill levels https://wiki.multitheftauto.com/wiki/Weapon_skill_levels that can be set with https://wiki.multitheftauto.com/wiki/SetPedStat 

Weapon properties: https://wiki.multitheftauto.com/wiki/SetWeaponProperty

 

2. Vehicle handling can be set serverside on new vehicles (it's explained in the documentation :D) and that works fine!

 

3. Sure, if this ever gets implemented into MTA:SA default resources somehow, we can have custom new vehicle/skins appear in the F1 spawn menu!

 

Possibilities are endless my friend!

Excellent Answers! Thank you sir!

  • Thanks 1
Link to comment
  • 4 weeks later...

An update will be released soon! ? I'm waiting on MTA to update as a few important bugfixes were pushed. (Pull 2474Pull 2486) Thank you @TheNormalnij ?

I'll also be improving my other project that uses this newmodels library: https://github.com/Fernando-A-Rocha/mta-samp-maploader and publishing the 1st stable release.

 

PS. I've received multiple messages of people wanting to implement this in the OwlGaming Gamemode. I'll see if I can improve the tutorial present in the README.md on the GitHub repo.

Edited by FernandoMTA
  • Like 1
Link to comment
  • 4 weeks later...
  • 1 month later...

NEW RELEASE v.1.7.0:

Backwards compatible (almostChanges:

  • Altered the way you're meant to use spawnPlayer: corrected the example in README which was wrong
  • Added a fix for skin not loading after you re-spawn the player: it now refreshes (#12)
  • Vehicle upgrades are now saved in the server for syncing to all clients. Previously vehicles would lose upgrades every time the model was changed clientside. (#13)
  • Added ignoreTXD, ignoreDFF and ignoreCOL variables to use in mod_list and exported functions for loading models which don't need DFF/TXD(/COL for objects) (suggested by Gaimo#0152)

For any support with the newmodels library you can contact me. Details in the README.md

Enjoy! ?

 

Send me screens of newmodels in action in your servers!! ❤️ 

Edited by FernandoMTA
Link to comment
  • 1 month later...
  • 1 month later...
46 minutes ago, cocowen said:

i notice this use setelementdata , just want to ask if i have so many custom model do this cause so many lag using this lib

Hello, this server is currently massively using Newmodels: https://forum.multitheftauto.com/topic/133992-english-wip-6-monthz-in-zombie-apocalypse-roleplay/ 

They haven't experienced any lag using this lib, you can check it out for yourself :)

Also I have did a lot of testing and it doesn't affect. The element data is set on the vehicle/object/ped you want to have a custom model. Then the client listens to that elemtn data change, this is not performance heavy. You should have no problems :P 

Link to comment
19 minutes ago, FernandoMTA said:

Hello, this server is currently massively using Newmodels: https://forum.multitheftauto.com/topic/133992-english-wip-6-monthz-in-zombie-apocalypse-roleplay/ 

They haven't experienced any lag using this lib, you can check it out for yourself :)

Also I have did a lot of testing and it doesn't affect. The element data is set on the vehicle/object/ped you want to have a custom model. Then the client listens to that elemtn data change, this is not performance heavy. You should have no problems :P 

thank u , i am working on a complex server too , so i am very carefull about this performance and glad to try this

  • Like 1
Link to comment
  • 7 months later...

New v.2.2.0 update!

This update brings many improvements and two small fixes.

Highlights:

- added "lodDistance" parameter (there are new test mods that demonstrate it)
- modList can now be optional (mod_list.lua can be removed if u dont want mods defined in newmodels
- added removeExternalMods(ids_list) exported async function
- moved start/stop messages from testing_server.lua to server.lua

- fixed mod list checks not cancelling the resource because they were inside an Async function
- (edge case) fixed startFreeingMod(...) not doing tonumber(data_id) to compare with id, so people who set id element data string had problems

See the full changelog on GitHub!

Edited by FernandoMTA
Link to comment

Update v3.0.0 just got released. It was tested and is considered an important & major release.

If you are using previous versions of newmodels in your server, it is highly recommended that you read the full changelog and instructions on how to update your custom scripts and benefit from the improvements.

Optimization has been always been a concern throughout the project, and some mistakes were made. I can now say that it has been improved. You can compare various newmodels version using the MTA performance browser (/ipb).

newmodels has been in development since November 2021. It's now more than a year old!

Thank you for all the support, and let's keep making it great! ?

  • Thanks 1
Link to comment
  • 1 month later...

hi, i have a problem with re-setting element model to the base model, for example i set a my skin to 20001, its base model id is 1, when i try to re-set the element model to 1 it will not happen, tried with players skin and vehicles. with skins it will work if you change it to something other than the base model but with vehicles its diffrent, you cant use setElementModel to change vehicle model to anything, it will remain the moded model but the handling will get buggy, and after a little bit of time (after the moded model get freed because its no longer needed) it will change, yet to the base model, not the model i asked for. but the server thinks its alright, the vehicle name when i enter is the one i changed to and when i reconnect the model will be the model i requested

Link to comment
  • 4 weeks later...
  • 4 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...