14.12.2014, 12:17
(
Last edited by JaKe Elite; 15/12/2014 at 08:47 AM.
)
JaKe's House System v1
IntroductionWhen i began scripting, i started off using GarHouse it was great and cool. It is rare to find GarHouse these days,
so i decided to make a similar script to GarHouse, Note i never copied any codes from GarHouse, just an idea and stuffs. JakHouse has been scripted a while ago back in October, it has been in my PC long time ago, lazy to release it, now here it is. JakHouse is currently used in my server and pOS (Creed's server - modification has been done.) The house system doesn't support House Vehicles unlike to the other house system, This is just one simple house system with house storage, house note and a basic house system features. Feel free to edit it, PM (Consult) me first before releasing it, Took me 3 days to script it and fix the bugs before finally taking it's final BETA test on pOS.
Notes
There are no bugs found during the testing at pOS however, If you found one please post it on this topic or PM me about it, So i can fix it. All the commands has been tested.
If the dialogs doesn't work properly (the /hmenu), Make sure the OnDialogResponse is on return 0 or return 1, try them if it worked. So far no conflictions found during the testing on pOS and on my local server.
Notes from the source code, Read them, I don't need to explain it since i already explain them on the comment (//).
pawn Code:
// Configuartions
#define MAX_HOUSE_NAME 256
#define MAX_HOUSES 350
#define FREEZE_LOAD true
//If enable, Freezes you once entered the house, freezes you aswell once exited the house
//The freeze lifts off in 5 seconds, depends on FREEZE_TIME
#define FREEZE_TIME 5 //In seconds
#define FORCE_SPAWNHOME true
//Once the FORCE_SPAWNHOME is set to true, a timer will be run for 2.5 seconds when you spawn.
//Once that timer is called, Player will be forced spawn in his home if he has the spawn settings on.
//This define is created as the spawnhome feature we had doesn't work, as instead of spawning at home, it spawns at the gamemode's spawnpoint.
//You can change this [Just make sure you know what you are doing].
#define SALE_PICKUP 1273
#define NOTSALE_PICKUP 1272
#define NOTSALE_ICON 32
#define SALE_ICON 31
#define STREAM_DISTANCES 35.0
//Do not make it higher, or else it will conflict with the other stream objects etc.
Open the JakHouse zip file, Now open the folder called "JaKe's House System", Open up the filterscript there are 2 folders, compiled and source. If you want to edit the script, Open the source folder, there'll be a .pwn name jakhouse, Move it to your server's filterscript then recompile it. If you don't want to edit the script and decided to stick with the default way of my scripting, Choose the Compiled folder, there'll be a .amx name jakhouse, Move it to your server's filterscript. Moving on, Head to pawno/includes, Place all the includes to your server's pawno/includes folder. Head back to the first page, Click plugins, There'll be two folders on it, One is Linux (CentOS) and Windows OS, if you are using a Windows Operating System, choose the folder Windows OS, there'll be two files (sscanf.dll and streamer.dll), Import them to your server's plugins folder. If you are using a Linux Operating System, choose the folder Linux (CentOS), there'll be a plugin similar to mentioned above but with the format of .so, Import them to your plugins folder. Now go to your server's scriptfiles, Create a folder name JakHouse, inside the folder JakHouse create 2 folders name 'Houses' and 'User'.
Now on loading the filterscript, It's basically easy. Open server.cfg and add the following.
filterscript jakhouse
plugins sscanf streamer
(Add .so in the end on the plugins' name if you are using Linux)
Commands
/hcmds - For the house commands
/buyint - To buy interior (Works only when you choose interior on /hmenu)
/cancelint - To cancel the preview interior (Same like /buyint)
/buyhouse - /sellhouse (Buys/Sells house, Works only when in-range of the pickup)
/hlock - To lock the house (Works only when in-range of pickup/Inside)
/hmenu - Player's House Configuration Menu")
/henter - Enters inside the house (If not locked).
/hnote - Adds a note to your house.
/hcnote - Checks a note on someones house
For RCONs, /ahcmds for RCON House commands.
RCON Commands
/addhouse - Adds a house
/removehouse - Removes a house
/gotohouse - Teleports to the house
/hinteriors - Lists all the available interior
/hmove - Moves the specific houseid to your current location.
/asellhouse - Sells the house without doing the actual command.
/hnear - Lists all nearby houses within 35 meters.
Explanation
• Level - Score needed by the player to buy the house, for E.G. 999 level, You need 999 score and above to buy the house. (Cannot be edited, only at /addhouse and .ini editing)
• Price - Cash needed by the player to buy the house, for E.G. 999 cash, You need $999 cash (or above) to buy the house. (Can be edited throughout /hmenu, /addhouse and .ini editing)
• HouseID - HouseID assigned to the house for editing.
♦ Owner - Owner of the house (Default is None)
• Description - Name of the house (E.G. JaKe's house)
Screenshot
(For sale house)
(House bought by the Player JaKe)
(House menus)
NOTE: I am using a modified JakHouse so it's a little bit different from the released version, I am using a modified one (Implemented to my Gamemode)
Credits
JaKe for scripting JakHouse.
Zeex for zcmd, ****** for both foreach and sscanf, Incognito for streamer, DracoBlue for dini.
Creed, Anna and pOS staffs for testing JakHouse - They have the original copy.
Download
v1 - Pastebin (Manual Installation/Downloading)
v1 - Solidfiles (Manual Installation/Automatic Download incs.)