GHomes is provided with strong and easy-to-use tools which will allow you to quickly add -if the map you're using is not supported yet- houses or apartments to your favorite map.
You can either buy/rent the home/apartment directly on it's front panel or go to the NPC selling them, you can also disable the panels in the config to force the players to use the Seller.
Buy houses from NPC or/and from the 3D panel; For more realism you can disable the 3d panels and force the players to use the NPC
Let the players rent or purchase properties
Let the players decide for how much days they rent the home
Renew the lease before it expires
Easy as hell to use tools allowing you to add your own maps/houses/apartments
Auto props saving for the owner of the house/apartment every 5 minutes
Auto keys managment, directly use them, no F2 or door linking bullshit
Prevent people from spawning shit on your lawn
Sexy preview of the property when buying it with the NPC
Sexy 3D panel if you decide to keep it enabled
Add co-owners, allow them to open/close doors and spawn props
With the 3D Panel, ring the doorbell and leave messaged to the owner or the co-owners, they will be able to read them directly on it.
ESL ONE Certified mathematics used for optimizations
Sexy booting animation for the tool (you'll see it only once, don't worry)
[NEW] You can now edit houses (daily price, perma price, name etc) directly with the NPC
Even if the tool to add homes is easy as hell to use, ready-to use maps files are provided with the addon, more will come in the future, but keep in mind using the tools is really easy.
All existing map are supported, there is nothing as an "unsupported map", the tools are easy as fuck to use, really
(I know it's supposed to be X per day and not per days, it's fixed in the addon but i'm too lazy to re-record it)
sexy booting animation which you will see only once ;), don't worry about seeing it evertime to use the tool
Is it real-time based ?
Yes, if you rent the house for 1 day, it's one IRL day
How is the prop protection working ?
Owners can spawn props, they will be saved (and restored when he join back the server) every minutes, co-owners can spawn props but they will not be saved, and other people can't spawn props inside the home.
Can you choose between the panel and the npc ?
Yes, you're not forced to spawn the NPC, you can even remove it if you're using one of the pre-configured map.
You can also disable the panels in the config
The config is in ghomes/lua/autorun/
Can i make the homes auto-sell when the player leave the server ?
It's not supported by default but here is how to do it :
go in ghomes\lua\ghomes_system\server\houses.lua
at the bottom, add :
hook.Add("PlayerDisconnected", "autosellproperty", function(ply)
for k, v in pairs(ghomes.list) do
if v.isrented and v.owner == ply then
ghomes.setowner(false, k)
end
end
end)
You might also want to disable the prop saving in the config
Drop ghomes in addons
If you want to use my collection of houses, merge /data/ from the zip with garrysmod/data on your server, only do it at the first time you install the addon, since the files you're moving are where are stored the data, overwriting them would reset the homes/properties (call it how you want)
It works on the last darkrp version, and should work with nutscript i added the correct hooks but didn't test it
If you want to make it compatible with your gamemode, here is what you need to know
The save is in data/ghomes_system and is restored on the DatabaseInitialized
hook
I'm overwriting the darkrp door system, which means i use the hooks : canKeysUnlock
and canKeysLock
I'm using the function DarkRP.formatMoney
which mean that if you're porting it to your gamemode, you'll better make a wrapper for it, instead of changing all the funcs after each update
In the DRM-Protected code, you can either send me the global table of your gamemode and ask me to add the function to set/get the money of the player or make a wrapper for : ply:getDarkRPVar("money")
and ply:addMoney(amount)
but if you make a wrapper, the variable (a table) DarkRP
needs to exist.
I'm setting them as door:setKeysNonOwnable(true) to overwrite them.
All "houses/properties/call-it-what-you-want" are stored in ghomes.list, which is a table.
bool ghomes.list[x].isrented
if true means someone is renting it OR owning it
bool ghomes.list[x].ispermarented
if true, it's purchased, if false, rented
void* ghomes.list[x].owner
if NULL, the owner is not connected, if not null, it's the pointer to the player entity.
void **ghomes.list[x].doors
is a table of entites with all the entities of the doors used by the house
Thanks :
Arion Threebow & Ben & Owain Owjo & Blue for opinions'n'tips on the forum
R4k0 for helping me testing
Sgt. Jenkins for helping me testing
Check out my other dank script