[Include] House System
#1

INFORMATIONS:
About: House System, 601 code lines - (MySQL, foreach, sscanf2, Streamer, ZCMD)
Version: 1.0
Last Update: 24/05/2017

AVAIBLE COMMANDS:
- /buyhouse, use for by house;
- /house, use for all cmds list;
- /henter, use for enter in house;
- /hexit, use for exit from house;
- /house door, use for close/open your house;
- /house withdraw, use for withdraw some money from your house;
- /house balance, use for deposit some money to you house;
- /house balance, use for see your house's money;
- /ahouse create, use for create house;
- /ahouse delete, use for delete house;
- /ahouse save, use for save house;
- /ahouse near, use for see near house's ID;
- /ahouse createdat, use for see when the house was created;
- /ahouse sell, use for sell house;
- /ahouse stats, use for see all house's informations;

LAST UPDATE:
- 24/05/2017, House System 1.0 version, was released;

SCREENSHOTS:


DOWNLOADS:
1.0 - (https://pastebin.com/WxevUzhB)
Reply
#2

Will test it, nice job.

Edit: Got some errors:
Код:
C:\Users\Tom\Desktop\samp037_svr_R2-1-1_win32\pawno\include\house.inc(63) : error 001: expected token: "-identifier-", but found "-integer value-"
C:\Users\Tom\Desktop\samp037_svr_R2-1-1_win32\pawno\include\house.inc(113) : warning 235: public function lacks forward declaration (symbol "OnPlayerEnterDynamicArea")
C:\Users\Tom\Desktop\samp037_svr_R2-1-1_win32\pawno\include\house.inc(115) : error 017: undefined symbol "Streamer_GetIntData"
C:\Users\Tom\Desktop\samp037_svr_R2-1-1_win32\pawno\include\house.inc(121) : error 017: undefined symbol "sprintf"
C:\Users\Tom\Desktop\samp037_svr_R2-1-1_win32\pawno\include\house.inc(126) : error 017: undefined symbol "sprintf"
C:\Users\Tom\Desktop\samp037_svr_R2-1-1_win32\pawno\include\house.inc(148) : warning 235: public function lacks forward declaration (symbol "OnPlayerLeaveDynamicArea")
C:\Users\Tom\Desktop\samp037_svr_R2-1-1_win32\pawno\include\house.inc(172) : error 017: undefined symbol "mysql_tquery"
C:\Users\Tom\Desktop\samp037_svr_R2-1-1_win32\pawno\include\house.inc(176) : error 017: undefined symbol "cache_num_rows"
C:\Users\Tom\Desktop\samp037_svr_R2-1-1_win32\pawno\include\house.inc(181) : error 017: undefined symbol "Iter_Free"
C:\Users\Tom\Desktop\samp037_svr_R2-1-1_win32\pawno\include\house.inc(184) : error 017: undefined symbol "cache_get_value_int"
C:\Users\Tom\Desktop\samp037_svr_R2-1-1_win32\pawno\include\house.inc(185) : error 017: undefined symbol "cache_get_value"
C:\Users\Tom\Desktop\samp037_svr_R2-1-1_win32\pawno\include\house.inc(186) : error 017: undefined symbol "cache_get_value"
C:\Users\Tom\Desktop\samp037_svr_R2-1-1_win32\pawno\include\house.inc(188) : error 017: undefined symbol "cache_get_value_float"
C:\Users\Tom\Desktop\samp037_svr_R2-1-1_win32\pawno\include\house.inc(189) : error 017: undefined symbol "cache_get_value_float"
C:\Users\Tom\Desktop\samp037_svr_R2-1-1_win32\pawno\include\house.inc(190) : error 017: undefined symbol "cache_get_value_float"
C:\Users\Tom\Desktop\samp037_svr_R2-1-1_win32\pawno\include\house.inc(191) : error 017: undefined symbol "cache_get_value_float"
C:\Users\Tom\Desktop\samp037_svr_R2-1-1_win32\pawno\include\house.inc(193) : error 017: undefined symbol "cache_get_value_int"
C:\Users\Tom\Desktop\samp037_svr_R2-1-1_win32\pawno\include\house.inc(194) : error 017: undefined symbol "cache_get_value_int"
C:\Users\Tom\Desktop\samp037_svr_R2-1-1_win32\pawno\include\house.inc(195) : error 017: undefined symbol "cache_get_value_int"
C:\Users\Tom\Desktop\samp037_svr_R2-1-1_win32\pawno\include\house.inc(196) : error 017: undefined symbol "cache_get_value_int"
C:\Users\Tom\Desktop\samp037_svr_R2-1-1_win32\pawno\include\house.inc(197) : error 017: undefined symbol "cache_get_value_int"
C:\Users\Tom\Desktop\samp037_svr_R2-1-1_win32\pawno\include\house.inc(198) : error 017: undefined symbol "cache_get_value_int"
C:\Users\Tom\Desktop\samp037_svr_R2-1-1_win32\pawno\include\house.inc(199) : error 017: undefined symbol "cache_get_value_int"
C:\Users\Tom\Desktop\samp037_svr_R2-1-1_win32\pawno\include\house.inc(201) : error 017: undefined symbol "Iter_Add"
C:\Users\Tom\Desktop\samp037_svr_R2-1-1_win32\pawno\include\house.inc(210) : error 017: undefined symbol "cache_insert_id"
C:\Users\Tom\Desktop\samp037_svr_R2-1-1_win32\pawno\include\house.inc(243) : error 017: undefined symbol "mysql_format"
C:\Users\Tom\Desktop\samp037_svr_R2-1-1_win32\pawno\include\house.inc(243) : warning 202: number of arguments does not match definition
C:\Users\Tom\Desktop\samp037_svr_R2-1-1_win32\pawno\include\house.inc(243) : warning 202: number of arguments does not match definition
C:\Users\Tom\Desktop\samp037_svr_R2-1-1_win32\pawno\include\house.inc(243 -- 244) : warning 202: number of arguments does not match definition
C:\Users\Tom\Desktop\samp037_svr_R2-1-1_win32\pawno\include\house.inc(243 -- 245) : warning 202: number of arguments does not match definition
C:\Users\Tom\Desktop\samp037_svr_R2-1-1_win32\pawno\include\house.inc(243 -- 246) : warning 202: number of arguments does not match definition
C:\Users\Tom\Desktop\samp037_svr_R2-1-1_win32\pawno\include\house.inc(243 -- 247) : warning 202: number of arguments does not match definition
C:\Users\Tom\Desktop\samp037_svr_R2-1-1_win32\pawno\include\house.inc(243 -- 248) : warning 202: number of arguments does not match definition
C:\Users\Tom\Desktop\samp037_svr_R2-1-1_win32\pawno\include\house.inc(243 -- 249) : warning 202: number of arguments does not match definition
C:\Users\Tom\Desktop\samp037_svr_R2-1-1_win32\pawno\include\house.inc(243 -- 250) : warning 202: number of arguments does not match definition
C:\Users\Tom\Desktop\samp037_svr_R2-1-1_win32\pawno\include\house.inc(243 -- 251) : warning 202: number of arguments does not match definition
C:\Users\Tom\Desktop\samp037_svr_R2-1-1_win32\pawno\include\house.inc(243 -- 252) : warning 202: number of arguments does not match definition
C:\Users\Tom\Desktop\samp037_svr_R2-1-1_win32\pawno\include\house.inc(243 -- 253) : warning 202: number of arguments does not match definition
C:\Users\Tom\Desktop\samp037_svr_R2-1-1_win32\pawno\include\house.inc(243 -- 254) : warning 202: number of arguments does not match definition
C:\Users\Tom\Desktop\samp037_svr_R2-1-1_win32\pawno\include\house.inc(243 -- 255) : warning 202: number of arguments does not match definition
C:\Users\Tom\Desktop\samp037_svr_R2-1-1_win32\pawno\include\house.inc(243 -- 256) : warning 202: number of arguments does not match definition
C:\Users\Tom\Desktop\samp037_svr_R2-1-1_win32\pawno\include\house.inc(257) : error 017: undefined symbol "mysql_query"
C:\Users\Tom\Desktop\samp037_svr_R2-1-1_win32\pawno\include\house.inc(289) : error 017: undefined symbol "DestroyDynamicPickup"

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


26 Errors.
Reply
#3

adf.ly is not allowed, Use pastebin.
Reply
#4

Quote:
Originally Posted by oMa37
Посмотреть сообщение
adf.ly is not allowed, Use pastebin.
I've read the rules of the forum before posting the system, and as far as i'm concerned i'm not breaking any rule, adfly is free, it allows me to earn a few cents with a job i did and i will carry on with a variety of updates, it costs nothing, so i'm not selling a product or anything, i do not know where the problem is.


Future Update:
- furnitures;
- weapons inventory;

If you have ideas or tips to give me you are free to do so, if the idea is good it will probably be inserted.
Reply
#5

Adfly is not allowed. I do not know what part of the rules you have read, but you have clearly missed that part.

Quote:
Originally Posted by Rules
Note that "links that benefit you" includes pay-per-click links and advert click-throughs (adf.ly etc), use direct links instead.
Reply
#6

Updated link. (Pastebin)
Any suggestions?
Reply
#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
#8

There should be more interiors added to it, got some errors too as @TomCarter had but not bad.
Reply
#9

Quote:
Originally Posted by ItzColaBoi
Посмотреть сообщение
There should be more interiors added to it, got some errors too as @TomCarter had but not bad.
Update MySQL plugin to the right version. Also, sure. More interiors would be better.
Reply
#10

There are way better systems out there, add something unique to make your system have some importance.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)