Liberty Unleashed

Scripting => Scripting Discussion => Topic started by: xxxMDjxxx on March 30, 2011, 11:06:05 pm

Title: property script?
Post by: xxxMDjxxx on March 30, 2011, 11:06:05 pm
Could someone try to make a property script?
My idea is that admin could write a comand (/property) and he would see a gui menu showing fields for property name and cost and owner(or for sale) and when he saves it it would show a sphere on the place the admin was stading. And when a user enters that sphere he would see the data and have button buy or rent and a checkbox spawn here. And next time he signs in he spawns at that sphere(checkbox spawn here) and people could earn money from rents(every spawn 100$)
Title: Re: property script?
Post by: Thijn on March 31, 2011, 09:02:16 am
Why don't you make it?
We don't have all time of the world and most of the scripters are pro lazy *hides*
Title: Re: property script?
Post by: xxxMDjxxx on March 31, 2011, 10:42:28 am
Why don't you make it?
We don't have all time of the world and most of the scripters are pro lazy *hides*

Well i tried and i madw the gui menu bu i didnot suceed in saving it to a database file or hashing...
Title: Re: property script?
Post by: Bio on April 13, 2011, 02:41:43 am
i guess the property has to be defined with a 2d vector? (x,y pointers)
Title: Re: property script?
Post by: Thijn on April 13, 2011, 10:53:36 am
The way I do it, Save the ID, name and position of the sphere to an database (sqlite or hashes w/e)
Then load all those when the server starts, and save it to an class for fast reading.
Also save the Sphere pointer somewhere in your class.
Then when someone walks into a sphere loop trough your class and check if the sphere ID is in your class and display the stuff you want.

Easy huh? :P