30.09.2010, 11:29
Object Adder!
IntroductionThis was a script that was originally thought up by Realcop228 (The base idea of loading objects through a MySQL databse). What this script does is it allows you to add whole maps through a web document without having to restart your server or add a filterscript/edit your gamemode. It is good for servers that don't like restarting when they have a bunch of players to add a map quickly.
Scripting
This isn't a simple script to install and I'll try make it more "Noob friendly" next release. The instructions are pretty straight forward to me but they may not be for other people so please don't hesitate to ask questions. If you are wondering why I'm using the sscanf plugin; that's because if people use it for long periods of time it will be much, much more efficient. You must have the MySQL plugin which is located here. Also the sscanf plugin is needed. I recommend not using this to load all of your objects but a few maps would be fine. You are able to use either CreateObject, F_CreateObject (Fallout's streamer) or CreateDynamicObject (Streamer plugin) for now but I will make more if people ask.
Videos
[ame]http://www.youtube.com/watch?v=Jgl8sScnw74[/ame]
The more recent one is from the finished product. It is using the streamer plugin as a example.
[ame]http://www.youtube.com/watch?v=GBSkMLS4wE4[/ame]
This one is from the early development when I had only finished the adding of objects part.
Instructions
These are some nice long instructions, please post if you are unclear on any of these steps.
Код:
1. Firstly you must setup your database and tables. a. Go into the folder SQL table located in the same directory as these instructions and make sure the file "tables.sql" is there b. Go into PhpMyAdmin in your hosts control panel (If you are using other software look for a import button of some sort). c. If you have not already created a database your host make one now d. Find the tab that says import up the top and click it e. Browse for that "Tables.sql" and insert it. f. Your mysql should now be set up. Make sure you remember those mysql details (Host, user, pass, database). 2. Secondly must setup the pawn script. a. If you are using either F_Streamer (Fallout's) or the streamer plugin uncomment the includes b. Edit the database information to what you use (Host, User, Password, Database). If you are using wamp on localhost than it's already default. c. You will need the MySQL plugin and include (https://sampforum.blast.hk/showthread.php?tid=56564) and the sscanf2 plugin and include (https://sampforum.blast.hk/showthread.php?tid=120356) d. If you are using CreateObject, leave the COB, CDO, FCO as it is. If you are using the streamer plugin, Uncomment CDO and comment COB. If you are using fallouts, uncomment FCO and comment COB e. Compile the script and make sure all the plugins are working. f. If you are planning on pre-loading more than 500 objects at a time change the MAX_LOAD_OBJECT value to a higher value. g. If you have any problems with compiling make sure you have put all the includes including MySQL and Sscanf2 into your includes folder h. If you are still having problems, download the full server package with it already installed (Link down the bottom) 3. Lastly you must setup your site. a. Go into the online FTP in your host. b. Click upload c. Select all the files for the site. If you cannot do that just winzip the whole site, upload the .zip and extract it. d. You should upload it somewhere that isn't on the main index. e. If you have issues with uploading, contact your host. 4. Lastly the instructions to use it i. a. Go into the main directory of your site and you should find yourself with a page to do with Database information b. Insert it from earlier when you setup your mysql (Host, user, pass, database) and press submit. c. If you get a message saying incorrect information, try it again. d. If the problem persists and you have your MySQL hosted somewhere else (Other than the website host), ask your host to unblock external MySQL connections or you can do it if there is a option in the control panel ii. a. After logging in and thinking what a shitty website design you can add some objects. b. To add a object click the Add objects option on the menu. Chose your format and make a reference (Reference is used to delete later so don't forget it) then insert some objects! c. If you get the error that the table is missing, make sure you inserted the SQL file into Phpmyadmin and make sure that the tables are the right case (CreateObject instead of createobject) iii. a. After getting bored of a map you can delete it by clicking the delete objects link in the menu b. Put your format and reference number you got before and if your server is running tick the immediate box
Downloads
The PHP + Script + SQL table
The whole server (If you are unable to set it up).
Please report any Minor or major bugs you find or if you are unable to complete one of these steps either post here, send me a PM or contact me on MSN (Look in my signature).