Jump to content

[REL] GTWalrus personal vehicles and shops


Mr_Moose

Recommended Posts

GTW-RPG player vehicles, is an advanced player vehicle system written from scratch with lot's of useful features and innovations you never seen in a player vehicle system before, some examples are found in the list below. Watch the video for more details.

Features

  • Shops allover the map
  • Unlimited amount of vehicles
  • Inventory system
  • Optimized to work on older hardware as well
  • SQLite database to store data

Information

This is a part of the GTW-RPG project available on Github licensed as GNU, (General public license v3). You may use, alter and redistribute as long nothing is removed from contributors.

Download

https://github.com/404rq/GTW-RPG/tree/master/%5Bresources%5D/GTWvehicleshop

Live demo:

mtasa://kar-se.404rq.com:22004

Edited by Mr_Moose
Updated dead links
Link to comment
Great job as always MrBrutus , i didn't tested it yet but it looks awesome on the video!

Keep it up!

Thanks :)

Good job, didn't notice any bugs and the code looks clean. But please could you pack it into a zip file or something, it's annoying copying all the source code from Github by hand. :x

Try navigate to the root of the Github page, there you'll find a "download as zip" button which should do what you want.

Link to comment

Greatest vehicle shop system i have ever seen!

Fully working, 0 bugs and awesome features thank you again for sharing this bro.

I got a suggestion that can be good and its to add a vehicle ownership limit and spawn limit, like only 5 vehicles can be spawned at once and only 10 vehicles can be owned per player

Link to comment

Great resource , keep it up MrBrutus ;)

@Wisam In case you wanna add a vehicle limits just add a check

Here's an example

  
function playerVehicles() 
    return dbQuery("SELECT * FROM vehicles WHERE owner=? AND ID=?", getAccountName(getPlayerAccount( client )) 
end 
  

Then add a check to the vehicleBuyRequest function

function vehicleBuyRequest( model ) 
     -- some functions 
  
     if playerVehicles(client) >= 10 then outputChatBox(client,"You can't buy more than 10 vehicles.",255,0,0) return end 
     -- functions 
  
  
end 
  

Link to comment

@Wisam, Actually there's no need for limitations, first let's have a look at the database file, a single vehicles won't need more than 500b of data as it's mostly integers, that means 2 million vehicles is required before the file even reaches 1GB in size which is pretty fair I suppose.

When it comes to the spawn part you may be right, to many objects at the same point will cause lag, but it's hard for a single player to afford over 100 vehicles and then spawn them in the same place, they won't really win anything on that as everything is cleaned up and saved into the database as soon they leave the server.

@Chronos, The priority of a limitation feature is low currently, but feel free to do a pull request if you wish: https://github.com/GTWCode/GTW-RPG/pulls

@LaCosTa, Thanks ;)

Link to comment

There is a few bugs with gridlist, Mr.Brutus you know gridlist have a old bug if you change it and re-open the panel will mess up all list(gridlist), So I advice you to block the ability to change the order in any type of gridlist...

I bought a Maverick and infernus and then I change the order, so they switch...

Maverick was in Infernus and Infernus at Maverick, :D

Link to comment

That's why I like git as it's extremely effective when I need to modify something quickly and distribute it to a large amount of servers ;) Thanks for reporting this issue.

The modshop however, is unfortunately compiled which is sad as it's a good system, it was created by Dennis and you'll find it here: http://community.mtasa.com/index.php?p=resources&s=details&id=7001. I managed to modify it a bit but as it is compiled I assume I'm not allowed to redistribute it, so you may have to find other ways. The vehicle system will save the mods that is currently applied to the vehicle, so it doesn't matter which mod system you use, even the admin panel works.

Link to comment
Thanks a lot, yes I already tested this system a 1/2 hours ago and is awesome, maybe I will try later change what I want(GUI) a few modifications, I know can be hard, maybe impossible, but who knows.

Good luck with that, all GUI components are available at the top of the client side parts so it should be relatively easy to modify. The shop GUI may be harder as it's mostly recycled from an older resource, but it will be updated soon as well.

Great work man!

The resource is amazing!

Thanks 8)

Link to comment
  • 2 months 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...