29.03.2008, 11:56
[INC] tAxI's Housing System
This system is a fairly complicated housing system which saves permanently. As the title suggests It's a stand alone system which is designed to be a replica of the PEN1 housing system complete with house vehicles and some upgrades to the system. - BEFORE ANYONE SAYS THIS IS A COPY OF CODE GUESS AGAIN - THIS IS 100% MY CODE FROM SCRATCH and PEN1 can go stick it where the sun don't shine lol :PHOUSING:
the house system allows you to place up to 250 houses on your server. each house is shown on the mini-map by a red or green house marker depending on whether or not it has been bought by anyone. The house configuration allows the server owner to specify individual house interiors and interior world ID's so loads of houses can have the same interior without a player being overlapped. Each house has a pickup at the entry point and when a player picks it up it will display a description of the house, house cost, house owner and whether or not the house has been locked. each house also has a Safe to store money in for a player that owns the house.
HOUSE VEHICLES:
Each house has one vehicle linked to it. When you buy the house you get a vehicle thrown in which you can secure against theft or use by other people. The vehicle is also under insurance and any mods you make at a mod garage are saved along with th house so that when the vehicle respawns it will respawn with any mods you applied to it previously - mods will only be saved if u own the house that the vehicle is linked to. The vehicle insurance system also ensures that if another player is driving your vehicle and it is destroyed then a certain amount of money is paid into your safe inside your house. The value of each car is variable with the number of mods you have added - each mod adds $100 value to your house vehicle with the base value of the vehicle being 1500 in value with no mods applied.
PLEASE NOTE:
Basically this is an unfinished script thus far, i was talking to a few people on msn and they wanted me to release it early to get a sort of sneak preview of it. the entire system runs off a backend of files for houses and users. I am integrating a logontohousesystem command so players can easilly link it into already existing user reg and login systems. As it is unfinished there are no useful commands yet but the house placement and display system are all up and running (hopefully) Basically i need people to test the code for me as i cannot compile anything on this cmp just now so im not sure if there are any obvious glaring problems. There are no management options for the houses yet but if you setup a file called tAxI_houses.cfg in your scriptfiles directory and apply the callbacks in the corrct places in your script it is possible to add houses. Each line of the file will represent one house and all of the variables should be set up in the following way:
Код:
cost,isowned?(0/1),"null",description,owner,pickupx,pickupy,pickupz,intposx,intposy,intposz,worldid,interiorid,locked?(0/1), 0,vehiclex,vehicley,vehiclez,vehicleza,0,vehiclemodel,locked?(0/1),0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,vehiclecolor1,vehiclecolor2,0
DOWNLOAD HERE -> http://sampstorage.coconia.net/housing%20system/