[Include] House System
#7

I have a suggestion to support a lot more houses.

Код:
public OnPlayerEnterDynamicArea(playerid, areaid)
{
    new houseid = Streamer_GetIntData(STREAMER_TYPE_AREA, areaid, E_STREAMER_EXTRA_ID) - HOUSE_MAGIC;
1.) Set the extraid to point to the primary integer key in your DB.
2.) Make query only when required to load house data.
- Check if house is already loaded if not load data
3.) Save house data into a per player array.
4.) Reference that array for any house actions.

Some other ideas, you could buffer loaded houses then check the buffer before making any queries this way if you got 10 guys going into a single house only one query would actually be made. The good thing is this is pretty much done for you already by using this kind of system! All you would have to do is loop through all the players.
Reply


Messages In This Thread
House System - by IFilip - 25.05.2017, 13:22
Re: House System - by [G]am3r - 25.05.2017, 13:39
Re: House System - by oMa37 - 25.05.2017, 13:57
Re: House System - by IFilip - 25.05.2017, 19:48
Re: House System - by Private200 - 25.05.2017, 21:48
Re: House System - by IFilip - 25.05.2017, 22:00
Re: House System - by Pottus - 25.05.2017, 23:16
Re: House System - by ItzColaBoi - 17.06.2017, 17:14
Re: House System - by Astralis - 18.06.2017, 17:42
Re: House System - by iLearner - 18.06.2017, 18:02

Forum Jump:


Users browsing this thread: 1 Guest(s)