03.03.2011, 19:52
Can anyone explain me how to create houses? I don't understand how to associate player's account with house (I writing from scratch and using ini reg system writen by myself)
new HasHouse[MAX_PLAYERS];
new IsInHouse[MAX_PLAYERS];
I know how to create pickups.
I can't get other things. For example, how to prevent player from buying house if he's already had one. And what if player's account has been removed, what about his house? |
Use vars, like..
pawn Код:
|
enum playerinfo {
pHouseKey
};
new PlayerInfo[MAX_PLAYERS][pHouseKey];
Using arrays is to recomend..
pawn Код:
|
enum playerinfo {
pHouseKey
};
new PlayerInfo[MAX_PLAYERS][playerinfo];
Lets say there is a house line in the player file (house = -1)
and if he bought a house, lets say houseid 5 (house = 5) if we read it than and it isnt -1, he got a house For easier usage just load the saved data into variables If his account is removed the house is ownerless and can be bought again... After all an house system isnt that complicated, its more or less two pickups with one id (enter pickup / exit pickup / houseid) |
If his account is removed the house is ownerless and can be bought again... |