[FilterScript] Dynamic Bus System [MySQL-ZCMD]
#1

* Bus System *
* Theory (aka Skyrise) *

Basic Concept -
MySQL based dynamic bus system.
Dynamically set via admin.
Players can call for a bus at a station - sent to available bus driver.

^^ That was when I thought of it.

What came out:
MySQL based.
Dynamically set.
bMods can be set via RCON Admin.
Simple radio for bus drivers
Drivers can be set by RCON admin. (you can change that for bMods.)
Accounts are automatically made and loaded. No need for integration.
bMod list.
You can /bnear and see if one is nearby.
Call a bus - cancel it.
There was going to be a duty system. Still deciding.

The code was written as-is. None of it was tested.

REQUIREMENTS
SSCANF2
BlueG's Latest MySQL plugin. (r15 or r14 if you're using Linux)
Streamer
Foreach
ZCMD

Find any bugs? Report them on this thread.
[Version 4]
http://pastebin.com/rPa40rcL - Main Script
http://pastebin.com/dKkYJZ68 - bSQL [unchanged]
[Version 3]
http://pastebin.com/Wj6ecrsN - Main Script
http://pastebin.com/dKkYJZ68 - bSQL
Reply
#2

hmmm very nice indeed ill test it good work
Reply
#3

Nice thought..
I will use it.
Reply
#4

Nice
Reply
#5

Looks like it's scripted fairly decently one thing though for future reference.

Код:
stock isDriver(playerid)
{
        if(sPlayerInfo[playerid][sDriver] == 1) return 1;
        return 0;
}
If you have something like this use #define

#define isdriver(%0) if(sPlayerInfo[%0][sDriver])

or reference it directly

if(sPlayerInfo[playerid][sDriver])

There is no need for a function.
Reply
#6

Thanks.

My reason for using it is because of pure laziness. I got tired of typing it out directly.
Reply
#7

Quote:
Originally Posted by Skyrise
Посмотреть сообщение
* Bus System *
* Theory (aka Skyrise) *

Basic Concept -
MySQL based dynamic bus system.
Dynamically set via admin.
Players can call for a bus at a station - sent to available bus driver.

^^ That was when I thought of it.

What came out:
MySQL based.
Dynamically set.
bMods can be set via RCON Admin.
Simple radio for bus drivers
Drivers can be set by RCON admin. (you can change that for bMods.)
Accounts are automatically made and loaded. No need for integration.
bMod list.
You can /bnear and see if one is nearby.
Call a bus - cancel it.
There was going to be a duty system. Still deciding.

The code was written as-is. None of it was tested.

REQUIREMENTS
SSCANF2
BlueG's Latest MySQL plugin. (r15 or r14 if you're using Linux)
Streamer
Foreach
ZCMD

Find any bugs? Report them on this thread.

http://pastebin.com/Wj6ecrsN - Main Script
http://pastebin.com/dKkYJZ68 - bSQL
can you make an non mysql version aswell
Reply
#8

Quote:
Originally Posted by matthew1211
Посмотреть сообщение
can you make an non mysql version aswell
Sorry, I am not going to do that. I feel MySQL is more efficient and easier to work with.
Reply
#9

Better would be a system that requires you to enter commands to create a stop like / abus for the administrator, and then dynamically creates a place to stop. But if you type the command / abus pops up a window to enter the name of the bus stop. After utworzniu stop now, you can use the bus, eg / bus and displays a GUI window that displays a list of stops for the player. The player chooses the second stop and jump out a window that displays information about driving: driving time, charge and name of the stop. For a user to be familiar with it. And the option "go" or return to the list.
Reply
#10

Very Nice Keep it up Dude
Reply
#11

Nice,love it !
Reply
#12

Thanks everyone.
Reply
#13

nice one.
Reply
#14

Update 4 released.
Reply
#15

Do not post untested code.
Reply
#16

Quote:
Originally Posted by zDivine
Посмотреть сообщение
Do not post untested code.
I know what I'm doing. No where does it say I have to test my code. If there are issues, then it will be addressed. It is a contribution to the community and I didn't have time to test it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)