GF guide by xusuqin

VIEWS: 0 PAGES: 5

									This is my mini-guide to adding houses and businesses, we'll start with
houses first.

After you have downloaded the godfather script, you would've also got
property.cfg, sbizz.cfg, and bizz.cfg in your scriptfiles. Lets worry about
property.cfg for now.

How to add houses

Here is an example of a property in the config.

2457.287597,-1054.422119,59.742198,1.200000,-
3.400000,999.400024,0,0,0,0,0,0,The
State,Trailer,25000,0,0,2,1,0,0,1,1,182,418,-1,-1,13,3

This looks like a whole heap of nerdy shit if you don't know what to do
with it, but here's the lowdown.

In your GF script you'll have enum hInfo. That lists what every number
(seperated by comma's) mean. here is the enum hinfo from a unedited GF
script.

Pawn Code:
enum hInfo
{
Float:hEntrancex,
Float:hEntrancey,
Float:hEntrancez,
Float:hExitx,
Float:hExity,
Float:hExitz,
hHealthx,
hHealthy,
hHealthz,
hArmourx,
hArmoury,
hArmourz,
hOwner[MAX_PLAYER_NAME],
hDiscription[MAX_PLAYER_NAME],
hValue,
hHel,
hArm,
hInt,
hLock,
hOwned,
hRooms,
hRent,
hRentabil,
hTakings,
hVec,
hVcol1,
hVcol2,
hDate,
hLevel,
};

new HouseInfo[34][hInfo];


So, if you can't figure it out already  What you mainly need to change
an existing line in property.cfg to make a new, completely different one is
(Only if they're not owned).

Float:hEntrancex,
Float:hEntrancey,
Float:hEntrancez,
Float:hExitx,
Float:hExity,
Float:hExitz,
hOwner[MAX_PLAYER_NAME],
hDiscription[MAX_PLAYER_NAME],
hValue,
hInt,

The Float:hEnterancesx-y-z mean where the pickup will be and where the
person can type /enter to get in. (2457.287597,-1054.422119,59.742198
from the example above)
The Float:hExits-x-y-z mean where the player will be teleported to when
he types /enter and where he can /exit from inside the house
also(1.200000,-3.400000,999.400024 from the example above)
The hOwner means, if it is not already owned, just change it to the default
(The State = nobody)
The hDescription means what it will say from the description, e.g. some
already in the game say 5 room luxury, etc. (Trailer, from the example
above)
the hValue is how much it will cost to buy (25000 from the example
above)
And the hInt is the interior which will be set when the player types
/enter(2 from the example above)
Now, if you didn't understand that, PM me, i'm more than willing to go
into more depth.

Once you have added a house into the property.cfg and saved it you
must go and edited two places in the script.

Go to enum Hinfo and scroll down a bit and you'll see this line (if using
Original GF)
Pawn Code:
new HouseInfo[34][hInfo];
If you added 1 house, add one to the 34, if you added 2, add two to the
36, etc.

The second part is here, under your addstaticpickups (if using Original
GF).

Pawn Code:
pickups=pickups+29;

If you added one house, make that +30. if you added two, make it +31,
etc.

There, now you should know how to add houses, compile your script, and
test it out.

How to add businesses

Normal businesses are very similar to houses. But here is an example of
a business.

0|The State|Gun Shop 1|No-one|2723.259521|-
2033.617553|13.547200|2170.278076|1618.818237|999.976623|5|5000
000|5|0|1|1|134|500|1

Once again, nerdy if you have no clue what you're doing, but here is the
enum binfo which makes it alot clearer.

Pawn Code:
enum bInfo
{
    bOwned,
bOwner[64],
bMessage[128],
bExtortion[MAX_PLAYER_NAME],
Float:bEntranceX,
Float:bEntranceY,
Float:bEntranceZ,
Float:bExitX,
Float:bExitY,
Float:bExitZ,
bLevelNeeded,
bBuyPrice,
bEntranceCost,
bTill,
bLocked,
bInterior,
bProducts,
bMaxProducts,
bPriceProd,
};

Now, to add a business in the .cfg, i would just copy and paste an existing
one, and change these parts.

(If it is owned DON'T USE IT)

bOwned, (0, in the example above, indicating it is not owned)
bOwner, (The State, in the example above, indicating it has no owner)
bMessage, (Gun Shop 1, in the example above, indicating it's name is Gun
Shop 1 )
Float:bEntrancesX-y-z,(2723.259521|-2033.617553|13.547200, in the
example above, meaning the player can /enter from this position and a
pickup will be placed here)
Float:bExitX-y-z,(2170.278076|1618.818237|999.976623, in the example
above, meaning the player, once inside can /exit from this point)
bLevelNeeded,(5, in the example above, indicating the player must be
level 5 or over to be able to buy the business, this is used to deter money
hackers from buying it at lvl 1)
bBuyPrice,(5000000, indicating you need 5000000 to buy the business)

If you still don't understand, PM me, or read it again.

Once you have added a biz in the bizz.cfg, go open your script and we
need to change two more things.

Search 'new BizzInfo' into your script, and you'll get to this line
Pawn Code:
new BizzInfo[5][bInfo];
if you added 1 business, change it plus 1 to the 5, making it 6, if you
added 2, plus 2 to the 5 to make it 7, etc.

Once you have done that, search 'addstaticpickup' and scroll down a little
until you see "pickups=pickups+29" (If you haven't added a house or bizz
ever before) If you added 1 biz, plus 1 to the 29 making it 30, etc.

Compile it, restart your server and it should work.

Now, sbizz's are much the same, and I will write the next section later,
too damn tired atm.

Thanks, post comments and mistakes in my instructions please and I will
fix them.
If you have any more difficulties, PM me.

( Credits to drake )

								
To top