SA-MP Forums Archive
[FilterScript] Miki!Props - Advanced House System - MySQL - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Miki!Props - Advanced House System - MySQL (/showthread.php?tid=255810)



Miki!Props - Advanced House System - MySQL - steki. - 17.05.2011

This is a property system that I made 1~2 months ago. It's pretty simple, but you can easily modify and do your way.

http://pastebin.com/bx6B1Ge7 - DB
http://pastebin.com/RPKQzz0j - Script

Have fun. If you want me to modify and do awesome things, PM me. (paid)

The script have some cmds to test, you can remove them.

Cintid is the custom int that you set in the interiorinfo table. It's just for create propertys easily.











Re: Miki!Props - Advanced House System - MySQL - Naruto_Emilio - 17.05.2011

This seems to be awesome release, First post Congrulaaz btw 4 stars rated


Re: Miki!Props - Advanced House System - MySQL - steki. - 17.05.2011

Thanks xD


Re: Miki!Props - Advanced House System - MySQL - Ricop522 - 17.05.2011

Cool FS, good job (:


Re: Miki!Props - Advanced House System - MySQL - nuriel8833 - 17.05.2011

Great Filterscript!


Re: Miki!Props - Advanced House System - MySQL - Forever Alone - 17.05.2011

Reading the code atm - it saves/loads some things from .ini? Also you should add, that it uses Strickenkids sql plugin. Btw, pastebin f@cks up identication.


Re: Miki!Props - Advanced House System - MySQL - hackzor4 - 17.05.2011

Pretty nice thanks dude !


Re: Miki!Props - Advanced House System - MySQL - Jason010 - 27.05.2011

Uhm are there already Houses Added becos i do not see anthying and /propertyhelp doesn't work maby i didn't loaded something probaly but i've got all the includes...


Re: Miki!Props - Advanced House System - MySQL - Tachibana - 23.06.2011

Got errors when complied:

pawn Код:
(306) : warning 213: tag mismatch
(541) : error 075: input line too long (after substitutions)
(542) : error 017: undefined symbol "propertyi"
(543) : error 017: undefined symbol "d"
(543) : error 029: invalid expression, assumed zero
(543) : error 029: invalid expression, assumed zero
(543) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


6 Errors.
Is it only me?


Re: Miki!Props - Advanced House System - MySQL - ViPGuy - 19.08.2011

I guess so.


Re: Miki!Props - Advanced House System - MySQL - [HiC]TheKiller - 19.08.2011

Here is a few suggestions that could make your script better:

1. You are using a query per house rather than one single query for all of the houses. A example of this would be

pawn Код:
new query[256];
new count = 0, i = 0;
mysql_query("SELECT * FROM propertyinfo");
mysql_store_result();
while(mysql_fetch_row(query,"|"))              
{
    printf("\n|------ Loading Property ID: %d" , i );
    new field[22][MAX_PLAYER_NAME];
    explode(query, field, "|");
    count++;
    propertyInfo [i] [E_X]          =   floatstr( field[  1 ] );
    propertyInfo [i] [E_Y]          =   floatstr( field[  2 ] );
    propertyInfo [i] [E_Z]          =   floatstr( field[  3 ] );
    propertyInfo [i] [E_INT]        =   strval  ( field[  4 ] );
    propertyInfo [i] [E_VW]         =   strval  ( field[  5 ] );
    printf("|--- Exterior Info| X: %f | Y: %f | Z: %f" , propertyInfo [i] [E_X],propertyInfo [i] [E_Y],propertyInfo [i] [E_Z] );
    printf("|--- INT: %d | VW: %d" , propertyInfo [i] [E_INT],propertyInfo [i] [E_VW] );
    propertyInfo [i] [I_X]          =   floatstr( field[  6 ] );
    propertyInfo [i] [I_Y]          =   floatstr( field[  7 ] );
    propertyInfo [i] [I_Z]          =   floatstr( field[  8 ] );
    propertyInfo [i] [I_INT]        =   strval  ( field[  9 ] );

    printf("|--- Interior Info| X: %f | Y: %f | Z: %f" , propertyInfo [i] [I_X],propertyInfo [i] [I_Y],propertyInfo [i] [I_Z] );
    printf("|--- INT: %d" , propertyInfo [i] [I_INT]);
    propertyInfo [i] [TYPE]         =   strval  ( field[ 10 ] );
    propertyInfo [i] [LEVEL]        =   strval  ( field[ 11 ] );
    propertyInfo [i] [CASHBOX]      =   strval  ( field[ 12 ] );
    printf("|--- Property TYPE: %d | Level: %d | Cashbox: %d" , propertyInfo [i] [TYPE] , propertyInfo [i] [LEVEL] , propertyInfo [i] [CASHBOX] );
    propertyInfo [i] [NAME]         =   field[ 13 ];
    propertyInfo [i] [OWNER]        =   field[ 14 ];
    propertyInfo [i] [CO_OWNER]     =   field[ 15 ];
    printf("|--- Name: %s | Owner: %s | Co-Owner: %s" , propertyInfo [i] [NAME] , propertyInfo [i] [OWNER] , propertyInfo [i] [CO_OWNER] );
    propertyInfo [i] [SOLD]         =   strval  ( field[ 16 ] );
    propertyInfo [i] [LOCK]         =   strval  ( field[ 17 ] );
    propertyInfo [i] [ALARM]        =   strval  ( field[ 18 ] );
    propertyInfo [i] [PRICE]        =   strval  ( field[ 19 ] );
    printf("|--- Sold: %b | Lock Level: %d | Alarm Level: %d | Price: %d" , propertyInfo [i] [SOLD] , propertyInfo [i] [LOCK] , propertyInfo [i] [ALARM], propertyInfo [i] [PRICE]);
    propertyInfo [i] [USED_SLOT]    =   true;
///////////////////////////////////////////////////////////
    propertyCP   [i]                =   CreateDynamicCP(propertyInfo [i] [E_X] , propertyInfo [i] [E_Y] , propertyInfo [i] [E_Z] , 2 , propertyInfo [i] [E_VW] , propertyInfo [i] [E_INT] , -1 , 4);
    printf("|--- PROPERTYID: %d | Loaded propertyCP: ID: %d" , i , propertyCP[i] );
    i++;
}
mysql_free_result();
2. Take out the debugging commands such as /pegarumabufunfa and /pd as they can be used by anyone.

3. You use sscanf for some of it and explode for the other part of it. Use sscanf for the whole thing.


Re: Miki!Props - Advanced House System - MySQL - Surferdude - 27.09.2011

Hmm... I get no error messages in the script and it loads the script but then when I type any of your commands Unknown Command thing comes up. I have logged into rcon but it's still not working! Why?


Re: Miki!Props - Advanced House System - MySQL - Jantjuh - 27.09.2011

Very good, it is so cool to see more and more people using MySQL!


Re: Miki!Props - Advanced House System - MySQL - Ammo - 29.09.2011

are houses already created?


Re: Miki!Props - Advanced House System - MySQL - Leo_Johnson - 16.10.2011

Awesome!!!


Re: Miki!Props - Advanced House System - MySQL - Inn0cent - 16.08.2013

Nice One Dude.


Re : Miki!Props - Advanced House System - MySQL - eyutha - 09.09.2013

I got this error
D:\SA-MP 0.3x server\filterscripts\hsystem.pwn(4) : fatal error 100: cannot read from file: "mysql"


Re: Miki!Props - Advanced House System - MySQL - HitterHitman - 20.11.2013

error "tag mismatch"


Re: Miki!Props - Advanced House System - MySQL - Th3oX - 31.01.2014

Use https://www.assembla.com/code/san-fr...sql.inc?rev=71
This MySQL include