Housing Script
#3

Quote:
Originally Posted by Mionee
Посмотреть сообщение
There's plenty of ways to do this.

For example, for my house system, I use:

pawn Код:
stock HousePath(h)
{
    new house[64], hid = h;

    hid = hIDInfo[hID] +1;

    format(house, 30, "Houses/%d.ini", hid);
    hIDInfo[hID] ++; // multiplying

    return house;
}
And it saves them like: http://i.imgsafe.org/4c6fba0.png
Inside the files: http://i.imgsafe.org/74c656e.png

I suggest you to look in how to use Y_INI (******'s thread for example) - or whatever saving system you use. There's also a few house systems released at the filterscript section that process files the way you want it to.

EDIT: Usage example:

pawn Код:
new INI:File = INI_Open(HousePath(h));

INI_SetTag(File, "House Data");

INI_WriteString(File, "Owner", "None");
INI_WriteInt(File, "Price", 25000);
INI_WriteInt(File, "Bought", 0);
How do you get it OnGamemodeInit to scan for these houses, or do you even have to? To put the house pickup down and a 3Dtextlabel on it.
Reply


Messages In This Thread
Housing Script - by Nathan_Taylor - 03.05.2014, 03:14
Re: Housing Script - by Dignity - 03.05.2014, 03:19
Re: Housing Script - by Nathan_Taylor - 03.05.2014, 03:21
Re: Housing Script - by Dignity - 03.05.2014, 03:24
Re: Housing Script - by Nathan_Taylor - 03.05.2014, 03:27
Re: Housing Script - by Dignity - 03.05.2014, 03:29

Forum Jump:


Users browsing this thread: 1 Guest(s)