Ownership
#4

Quote:
Originally Posted by AphexCCFC
Посмотреть сообщение
Thanks, any other alternative way? I need the loop because when I delete houses it changes the house ID's on server restart to match MAX_HOUSES.

pawn Код:
PlayerInfo[playerid][pHouse] = HouseInfo[idx][hHouseID];
This part changes the players house ID when they log in because the loop checks through the houses to see which one they own.
This is a really messy way to deal with your records, as this breaks referential integrity, and there's the possibility the player will get the ID of a newly made house.

The neatest way to do this IMO is to change your housing system to store each house with a unique ID number which never changes.

I think to keep your current system working, just remove the else statement as it is irrelevant. The player will probably notice they no longer have a house by looking at their stats, or whatever other system you have in place.
Reply


Messages In This Thread
Ownership - by AphexCCFC - 29.04.2014, 22:38
Re: Ownership - by Calgon - 29.04.2014, 23:53
Re: Ownership - by AphexCCFC - 30.04.2014, 00:00
Re: Ownership - by Calgon - 30.04.2014, 00:04
Re: Ownership - by AphexCCFC - 30.04.2014, 00:14
Re: Ownership - by Calgon - 30.04.2014, 10:06
Re: Ownership - by AphexCCFC - 30.04.2014, 16:56
Re: Ownership - by Calgon - 30.04.2014, 16:58
Re: Ownership - by AphexCCFC - 30.04.2014, 17:04

Forum Jump:


Users browsing this thread: 2 Guest(s)