๐Ÿ„ Farmhouse โ€“ Multiplayer Animal Farm

:cow2: Farmhouse โ€“ Multiplayer Animal Farm

Resource is written in lua language.

We had an older version about 4 years ago, which is now outdated and also was written in Typescript, and there were problems with the newer FiveM and GTA versions, so this is a revamped version 2, with more player interaction(s) with the entities.
The older version was more like an AFK money maker with some interaction, now you have to take care of your own farm. Maintain the ground, giving the proper foods, and keeping up the water levels and so on.


Links

Purchase
Video (intro & raw gameplay)

Please note that the video may not accurately represent the latest version of the script, as ongoing updates and changes are made. (Additional sound effects, etc.)
Follow the changelog update(s) on our Discord server.

Dependency

  • oxmysql
  • ox_lib

Performance

This is an instanced script, if you are inside the farmhouse interior, it will have more resource usage.

:framed_picture: Images

:nut_and_bolt: Key Features

  • :door: Rent out your farm โ€“ It is not possible to purchase them, only to rent them, which we believe makes them much more accessible to everyone.
  • :hotsprings: Tile ground system โ€“ Underneath the animals, there is a โ€œtileโ€ system that needs to be cultivated. The soil needs to be constantly mulched and replaced after a while, as the animals defecate on it, etc.
  • :cow2: Various animals โ€“ We tried to implement all the animals found in GTA into our system and gave them different needs so that players with different play styles would not be at a disadvantage.
  • :door: Rarity system - For easier transparency, we have assigned a so-called rarity to each animal, which you can find in the menu above the animals, displayed with stars. The better the animalโ€™s stats, the higher its rating. Of course, this does not mean that it is not worth buying an animal with a lower rating.
  • :door: Soil degradation - In all cases, the soil must be mulched, as the basic soil is not favorable for animals and their lives are constantly decreasing as a result. Mulched soil degrades over time, causing the animal to lose even more life.
  • :rock: Custom models โ€“ Composter, ground tiles, feed storages, pitchfork and many others.
  • :hut: Custom Farm Interior โ€“ A fully instanced environment, where you can manage everything from here, without having to go anywhere.
  • :loud_sound: Custom native sounds โ€“ +5 custom native sound effect. (PlaySoundFromEntity)
  • :package: Feed storages โ€“ If you buy any feed for your farm, it will be stored here, and you can fill your empty bucket from here.
  • :pick: Equipment System โ€“ You need a pitchfork for baling and shoveling manure, and a bucket for transporting water and feed to the right place.
  • :computer: Laptop โ€“ Purchasing feed, acquiring various farm animals, and selling various items are also possible here. In addition, we can assign different players and set their rights here.
  • :memo: Permission System โ€“ to add players with different permissions (handle storage, change lock, fill food troughts, etc.)
  • :gear: Serverโ€“Client Synchronization โ€“ optimized state management using RPC and event-driven logic
  • :level_slider: Config file โ€“ In the escowed version, we tried to include everything necessary for balance.
  • :hammer: Easy localization โ€“ locale files through .json
  • :repeat: Others โ€“ many others which are not mentioned hereโ€ฆ

:gear: Exports

Export name Description Parameters Returns
insertInterior Creates a new farmhouse x:number, y:number, z:number, price:number, name:string Promise
removeInterior Removes a farmhouse id:number Promise
resetInterior Resets the mine (ownership, and other entities) id:number Promise
setInteriorPrice Sets the houseโ€™s rent price id:number, price:number Promise
setInteriorName Sets the houseโ€™s name id:number, name:string Promise
setInteriorPosition Sets the houseโ€™s position id:number, x:number, y:number, z:number Promise

:gear: Commands

farmhouse_create_at
farmhouse_create
farmhouse_remove
farmhouse_reset
farmhouse_set_price
farmhouse_set_name

:gear: Events

Event name Description Parameters
onFarmhouseQuit Triggered when player disconnects from the server while being inside an interior source:number, houseId:number, houseX:number, houseY:number, houseZ:number
onFarmhouseRented Triggered when interior was just rented source:number, houseId:number, days:number
onFarmhouseRentRenewal Triggered when interior rent was renewed source:number, houseId:number, days:number
onFarmhouseRentExpire Triggered when interior rent was expired houseId:number

:gear: Install

  1. Download, you will receive more folders (mlo, props, sounds, etc.)
  2. Put all of them in one folder, for example [aquiver-farmhouse]
  3. Import the .sql file into your database
  4. Inside the bridge folder, modify the functions to fit your framework functions. (Inventory, etc.)
  5. Config file can be found at lua/shared/Config.lua
  6. start [aquiver-farmhouse]

Important file locations

  • Config lua/shared/Config.lua
  • Locale files locales/*.json
  • Image(s) data/images
  • Bridge (framework setup, commands, etc.) bridge/*.lua

Changing language

Handled by the ox_lib library. More information about changing the language can be found here.


Code is accessible Open-source available on Tebex
Subscription-based No
Lines (approximately) ~4000
Requirements None
Support Discord
3 Likes