[Tool/Web/Other] [PHP][MYSQL][FS]Object Adder!
#1

Object Adder!
Introduction
This 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
There is a copy of the instructions with the package.

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).
Reply
#2

I thought of that once too but cba to do it
Reply
#3

Nice one man
Reply
#4

Quote:
Originally Posted by saiberfun
Посмотреть сообщение
I thought of that once too but cba to do it
Took me about 3 days. Was pretty hard and I did get frustrated with the bugs .

Quote:
Originally Posted by Andrus
Посмотреть сообщение
Nice one man
Thanks Andrus.
Reply
#5

Nice. This FS can stream objects ?
Reply
#6

Awesome
Reply
#7

you megaMan!
Reply
#8

wow, thats a great idea. But i still like putting my objects in my GM. I may transfer this over, but it will be a while :P
Reply
#9

Great job! Also looks very fast.
Reply
#10

i will tri it
Reply
#11

I have something like this already in my server, its always nice to add objects without a restart.

Good job.
Reply
#12

Good job, looks good. I'm sure stunt/freeroam servers could use it, creating events at specific times, etc. Good job, once again.
Reply
#13

Looks good.
Very good.
Reply
#14

very nice work bro

keep it up!

Reply
#15

Hey can someone run a test? whats faster in loading these objects, reading from file or this with mysql
Reply
#16

Dakiller, you play on COD5 server, hi lawl
Reply
#17

Quote:
Originally Posted by GaGlets®
Посмотреть сообщение
Hey can someone run a test? whats faster in loading these objects, reading from file or this with mysql
It will probably be this and you can load objects onto your server from a external source.

Quote:
Originally Posted by Ernis456
Посмотреть сообщение
Nice. This FS can stream objects ?
This isn't really a object streamer but it uses others. It could be classed as a object streamer because you can use it to keep under the 254 limit.

Quote:
Originally Posted by Panoulis
Посмотреть сообщение
Nice work, but i get 1 warning while compiling it.

C:\Users\Panoulis\Desktop\Everything\PAWN script\object.pwn(44) : warning 201: redefinition of constant/macro (symbol "mysql_fetch_row(%1)")
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Warning.
Delete the mysql_fetch_row(%1) in the script because you have it somewhere else.

Quote:
Originally Posted by Hal
Посмотреть сообщение
wow, thats a great idea. But i still like putting my objects in my GM. I may transfer this over, but it will be a while :P
This is only for loading around 1-2k objects at a time without restart. Fun for testing maps people have made etc. I wouldn't load all of your objects through this though.
Reply
#18

Awesome release, but i need MySQL on my server?
Reply
#19

Quote:
Originally Posted by Brian_Furious
Посмотреть сообщение
Awesome release, but i need MySQL on my server?
Yeah, you do.
Reply
#20

What i can do i get this error:

[13:59:34] Error in mysql_query: Table 'object.players' doesn't exist
[13:59:34] Error in mysql_store_result: Table 'object.players' doesn't exist
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)